Back to the Vavoom Forum Archives


Forum

Some questions

Mon, 04 Aug 2008 10:44:56

Karnizero

I have some questions maybe you have solved before: [REALLY IMPORTANT] (Worth 5 free beers) 1.- I need to change the Pickup sound for each kind of item, for example, a sound for ammo, other for medkits, another different for health bonuses, and so on. How to do this? What .VC i need to change to do this? Or there is any kind of "PickupSound" property? [IMPORTANT ONES] (Worth 4 free beers) 1.- I need/want to change the original Health Bonus model (downloaded from Vavoom Downloads section). The problem is that the model i have to use seems to have a lower Y Coordinate, so when seeing in-game, the player sees the model down the floor. I need to rise the model, so it keeps just above the floor. How can i make this? I checked the .xml model definition file for "Bottle.md2", but no coordinates there. Do i need a MD2/MDL editor? 2.- Where is the shotgun/supershotgun area of effect defined? I need to change where the (super)shotgun shots hits, so they hit randomly over a circular area instead the classical Doom "line". I also need to increase the ammount of pellets, and not only their area of effect. Check this image if you dunno what im refering: [img:23vq13lt]http://xs130.xs.to/xs130/08321/doom23756.png.xs.jpg[/img:23vq13lt] Same for Chaingun, except to increase the ammount. [LESS IMPORTANT] (Worth 3 free beers) 1.- I want to make a weapon shooting at linear and conical shoots, something similar to Quake 2 Hyperblaster. The question is: where can i define the coordinates where the projectile will be spawned? 2.- Someone knows a decent MD2/MDL editor? (Dont aswer QuArK and/or 3D Studio, please). [MUCH LESS IMPORTANT] (Worth 2 free beers) 1.- I have created two sprites to replace the "PlasmaBall" sprites at "Spawn" and "Death" states. The sprites are Indexed (256 color) PNG with transparency images. As i have a PK3 File instead a WAD, i have those sprites at "Sprites/Projectiles/PlasmaBall/" directory into the PK3. All seems correct, but game crashes just when i press "Hurt me plenty" (this is, when i start a new game). The game seems to recognize the sprites at "Sprites/Projectiles/PlasmaBall/" directory, cause when i set back the original sprites at PlasmaBall.vc, the game runs fine. [DON'T ANSWER IF YOU DONT LIKE] (You give me all beers back) 1.- Is it possible to change the FullScreen HUD sprites/graphics by MDL models (or MD2, etc...)? 2.- Do you know how to make a kind of animated INTERPIC, like the Doom 1 one? Or even like the Quake 2 one? 3.- Is it possible to recreate or simulate this? -> [url:23vq13lt]http://wadsinprogress.info/index.php?a=showshot&wad=250&shot=2 Thanks in advance.
Mon, 04 Aug 2008 15:14:31

Firebrand

Well, it's good to see someone writing long posts, heh! <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P --> I won't answer everything in one post myself, but I'll give you the easier answers now and later post the more complex ones <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->. For different sound items, Vavoom defines the following sounds in the SNDINFO lump:
misc/i_pkup						dsitemup
misc/k_pkup						dsitemup
misc/w_pkup						dswpnup
misc/p_pkup						dsgetpow
$alias misc/health_pkup			misc/i_pkup
$alias misc/armor_pkup			misc/i_pkup
$alias misc/ammo_pkup			misc/i_pkup
It's pretty simple, just change the sounds for the aliases with your own sounds and include the SNDINFO in you WAD/PK3 file <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->. Oh, BTW you now owe me 5 beers <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->. Your sprite problem sounds like a bug, but I don't know, what happens if you name this same sprites the same as the plasma ball originals and place them in a WAD file? (2 more beers for me) And your last couple of questions, it's possible, but I would require some modifications to the statusbar progs, I'll get you some details of this later, the latest SVN progs source has some lumps that define animations for an INTERPIC with offsets, so you can set them whenever you want, I don't know how complete it is thought. And lastly, you can simulate something like that by placing small point lights around the columns. It would be cool to make some lump to define wall glows IMO, it would work better. EDIT: You owe me 7 free beers, heh! <!-- s:mrgreen: --><img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" /><!-- s:mrgreen: -->
Mon, 04 Aug 2008 17:29:53

Karnizero

[quote="Firebrand":qlfqcwne]Well, it's good to see someone writing long posts, heh! <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P --> I won't answer everything in one post myself, but I'll give you the easier answers now and later post the more complex ones <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->. For different sound items, Vavoom defines the following sounds in the SNDINFO lump:
misc/i_pkup						dsitemup
misc/k_pkup						dsitemup
misc/w_pkup						dswpnup
misc/p_pkup						dsgetpow
$alias misc/health_pkup			misc/i_pkup
$alias misc/armor_pkup			misc/i_pkup
$alias misc/ammo_pkup			misc/i_pkup
It's pretty simple, just change the sounds for the aliases with your own sounds and include the SNDINFO in you WAD/PK3 file <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->. Oh, BTW you now owe me 5 beers <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->. Using SNDINFO on this way makes things easier. [quote="Firebrand":qlfqcwne]Your sprite problem sounds like a bug, but I don't know, what happens if you name this same sprites the same as the plasma ball originals and place them in a WAD file? (2 more beers for me) Dunno, maybe a bug, maybe not. I wll try to define all i did: -> Sprites are Indexed PNGs with transparency -> I have modified the .VC for "PlasmaBall.VC" file. The "Spawn" state keeps unmodified, but the "Death state has one only frame instead of the two original frames. Note: I'm using Vavoom version 1.26, not 1.28 [quote="Firebrand":qlfqcwne]And your last couple of questions, it's possible, but I would require some modifications to the statusbar progs, I'll get you some details of this later, Although i dont need this now, it would be nice to have support for models at Full Screen Icons. [quote="Firebrand":qlfqcwne] the latest SVN progs source has some lumps that define animations for an INTERPIC with offsets, so you can set them whenever you want, I don't know how complete it is thought. Damnit... It sounds hard and long to implement. But afterall, that can be handly. The problem is: are those progs compatible with 2.16? [quote="Firebrand":qlfqcwne] And lastly, you can simulate something like that by placing small point lights around the columns. It would be cool to make some lump to define wall glows IMO, it would work better. [url:qlfqcwne]http://photobucket.com/albums/v411/Harrydude/Blue.jpg I mean that image (taken from Doomsday Engine) those pillars seem to glow, something like bloom effect or something... It would be nice Janis implements bloom effects <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P --> [quote="Firebrand":qlfqcwne]EDIT: You owe me 7 free beers, heh! <!-- s:mrgreen: --><img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" /><!-- s:mrgreen: --> Not really, since you have answered the last questions (so, give me back those beers you won) <!-- s:mrgreen: --><img src="{SMILIES_PATH}/icon_mrgreen.gif" alt=":mrgreen:" title="Mr. Green" /><!-- s:mrgreen: --> But as i see you thirsty, here's a free beer: [url:qlfqcwne]http://www.dad2twins.com/wp-content/uploads/2007/01/guinness.jpg Or travel Spain and we both will make "gimme beer". <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P -->
Mon, 04 Aug 2008 19:19:36

Janis Legzdinsh

[quote="Karnizero":2vt7uxkz]1.- I need/want to change the original Health Bonus model (downloaded from Vavoom Downloads section). The problem is that the model i have to use seems to have a lower Y Coordinate, so when seeing in-game, the player sees the model down the floor. I need to rise the model, so it keeps just above the floor. How can i make this? I checked the .xml model definition file for "Bottle.md2", but no coordinates there. Do i need a MD2/MDL editor? You'll have to change definition in .xml file to something like this:
		<md2 file="models/items/bottle.md2" skin_anim_speed="6" skin_anim_range="3" offset_z="10">
2.- Where is the shotgun/supershotgun area of effect defined? I need to change where the (super)shotgun shots hits, so they hit randomly over a circular area instead the classical Doom "line". I also need to increase the ammount of pellets, and not only their area of effect.
Check corresponding state action methods. In 1.28 they are in Inventory class. In DECORATE you can use A_FireBullets action method.
1.- I want to make a weapon shooting at linear and conical shoots, something similar to Quake 2 Hyperblaster. The question is: where can i define the coordinates where the projectile will be spawned?
There are different SpawnMissile methods that can be used.
1.- I have created two sprites to replace the "PlasmaBall" sprites at "Spawn" and "Death" states. The sprites are Indexed (256 color) PNG with transparency images. As i have a PK3 File instead a WAD, i have those sprites at "Sprites/Projectiles/PlasmaBall/" directory into the PK3. All seems correct, but game crashes just when i press "Hurt me plenty" (this is, when i start a new game). The game seems to recognize the sprites at "Sprites/Projectiles/PlasmaBall/" directory, cause when i set back the original sprites at PlasmaBall.vc, the game runs fine.
Can you send me small sample PK3 file that has this problem.
2.- Do you know how to make a kind of animated INTERPIC, like the Doom 1 one? Or even like the Quake 2 one?
You can create an intermission map. Check KDIZD how it can be done.
3.- Is it possible to recreate or simulate this? -> [url:2vt7uxkz]http://wadsinprogress.info/index.php?a=showshot&wad=250&shot=2
Maybe surrounding with lines that have a foggy texture on them. And set them to use additive translucency.
Tue, 05 Aug 2008 14:05:09

Karnizero

I will make "double-post" to answer the Firebrand and Janis answers. If not, that will result a really long post. <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> [size=85:3jb3jwaw][color=#FF0000:3jb3jwaw][quote="Firebrand":3jb3jwaw]Well, it's good to see someone writing long posts, heh! <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P --> I won't answer everything in one post myself, but I'll give you the easier answers now and later post the more complex ones <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->. For different sound items, Vavoom defines the following sounds in the SNDINFO lump:
misc/i_pkup						dsitemup
misc/k_pkup						dsitemup
misc/w_pkup						dswpnup
misc/p_pkup						dsgetpow
$alias misc/health_pkup			misc/i_pkup
$alias misc/armor_pkup			misc/i_pkup
$alias misc/ammo_pkup			misc/i_pkup
It's pretty simple, just change the sounds for the aliases with your own sounds and include the SNDINFO in you WAD/PK3 file <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->. Oh, BTW you now owe me 5 beers <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->. Tested and works nice. But i need too to set different sounds for Blue Armor, Green Armor and Armor Bonuses. Same for Healing items. Is that possible? I noticed that, for example, Armor items (Blue, green and bonus armor) are all the same class (i think "DoomArmor" class, or something). The only way to change the sounds is maybe changing the class those items inherit. Is that possible without many complications? I also need to change the class from "Light Googles" and "Area Map" to inherit from the same class as "BackPack" (i think it's class name is "Item"), instead of inherit from "PowerupGiver", so i can change the pkup sounds to match the same sound as "BackPack".[/color:3jb3jwaw][/size:3jb3jwaw] [color=#00FF00:3jb3jwaw]PROBLEM SOLVED.[/color:3jb3jwaw] I have used the variable [color=#AAAAFF:3jb3jwaw]PickupSound[/color:3jb3jwaw], defined at the [color=#00FFFF:3jb3jwaw]Default Properties[/color:3jb3jwaw] section from each item:
PickupSound = 'sound_at/sndinfo'
[quote="Firebrand":3jb3jwaw]Your sprite problem sounds like a bug, but I don't know, what happens if you name this same sprites the same as the plasma ball originals and place them in a WAD file? (2 more beers for me) Problem solved. Check Next post for details, plz.
Tue, 05 Aug 2008 14:32:25

Karnizero

[quote="Janis Legzdinsh":2yv8f521]You'll have to change definition in .xml file to something like this:
		<md2 file="models/items/bottle.md2" skin_anim_speed="6" skin_anim_range="3" offset_z="10">
Tested and works fine. But i have now another question about models: I have a model (both skin and md2 files) to replace the [color=#FF40FF:2yv8f521]PlasmaRifle[/color:2yv8f521] model. The model has a different frame set as the model downloaded from Vavoom web page. What i need is to know how to change the XML file. This is, how to modify the XML file frames definition and indexes so i can set the correct frames for the new model. I found nothing at the Vavoom wikia. It would be nice to have some docs about this. Or even you can explain me, and i will try to write something to send you. <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> [quote="Janis Legzdinsh":2yv8f521]
1.- I want to make a weapon shooting at linear and conical shoots, something similar to Quake 2 Hyperblaster. The question is: where can i define the coordinates where the projectile will be spawned?
There are different SpawnMissile methods that can be used. Not documented at our wikia, but is zDoom method working for this, using only progs (not DECORATE plz)? (remember im using Vavoom 1.26). [quote="Janis Legzdinsh":2yv8f521]
1.- I have created two sprites to replace the "PlasmaBall" sprites at "Spawn" and "Death" states. The sprites are Indexed (256 color) PNG with transparency images. As i have a PK3 File instead a WAD, i have those sprites at "Sprites/Projectiles/PlasmaBall/" directory into the PK3. All seems correct, but game crashes just when i press "Hurt me plenty" (this is, when i start a new game). The game seems to recognize the sprites at "Sprites/Projectiles/PlasmaBall/" directory, cause when i set back the original sprites at PlasmaBall.vc, the game runs fine.
Can you send me small sample PK3 file that has this problem. [color=#0080FF:2yv8f521]Problem solved[/color:2yv8f521]. The sprite has multiple orientations, and thats defined as "[color=#00FF40:2yv8f521]SPRTA1[/color:2yv8f521]", "[color=#00FF40:2yv8f521]SPRTA2A8[/color:2yv8f521]", "[color=#00FF40:2yv8f521]SPRTA3A7[/color:2yv8f521]", etc... I was missing a orientation frame, but the engine returns no error message, only the error from "debug" file, something like "assertion failed" or similar. I realized later that i was missing a frame. [quote="Janis Legzdinsh":2yv8f521]
2.- Do you know how to make a kind of animated INTERPIC, like the Doom 1 one? Or even like the Quake 2 one?
You can create an intermission map. Check KDIZD how it can be done. Yes, i know that, but i prefer to make an animated INTERPIC (as Doom 1 one "You are here ---> X"). For TITLEPIC, i will make a TITLEMAP instead. [quote="Janis Legzdinsh":2yv8f521]
3.- Is it possible to recreate or simulate this? -> [url:2yv8f521]http://wadsinprogress.info/index.php?a=showshot&wad=250&shot=2
Maybe surrounding with lines that have a foggy texture on them. And set them to use additive translucency. What do you want to mean with "foggy texture"? Texture simulating fog? or simply transparent texture? Thanks for this help. You both help me out a lot. <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> P.D. Last question: I have a high definition textures set (32 bit color, high detailed, 128x128, PNG). Does HIRESTEX lump works for Vavoom? Would you, Janis, think about implement support for specular and light maps? Or even shaders?
Wed, 06 Aug 2008 10:41:18

Crimson Wizard

I am sorry, in another time I would try to answer on everything if possible, but currently I am overwhelmed by my own problems <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->, so I will answer on a single one right now: [quote="Karnizero":1n81ixn7]2.- Do you know how to make a kind of animated INTERPIC, like the Doom 1 one? Or even like the Quake 2 one? It is possible to make almost ANYTHING in progs. For example, I was making Travel Map for our KRPG project, that is instead of Hexen interpic a whole map appears where user moves cursor and points to its next location. If there's no other more suitable way to make an animated interpic (Furebrand and Janis mentioned something above), you can always do following: go to doom/cgame/intermission.vc. It is a classs for displaying intermission with interpic and things. Since you know coding, you probably won't have much troubles understanding general algorythm there. Notice, that drawing map with locations made available only for Doom 1 (by placing preprocessor #ifndef DOOM2 ) - check methods IM_InitNextLoc, IM_DrawNextLoc etc. Then, when you have general idea, you may change everything, I mean - EVERYTHING. Draw what you like, animate what you like, make user able to control what is happening here, whatever. As for Q2 style intermission, frankly I don't remember how it looks like, if you mean a thing similar to Q1, where you could see level from a camera above with stats displayed, I believe it is possible too, but will need a different apporach.
Wed, 06 Aug 2008 19:51:09

Karnizero

[quote="Crimson Wizard":29jl9sf0]I am sorry, in another time I would try to answer on everything if possible, but currently I am overwhelmed by my own problems <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->, so I will answer on a single one right now: I was just asking myself about you yesterday: what happened to C.Wiz.?? He leaves Vavoom and KMOD??? .... <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P --> I also was offline a bunch of time. Real life issues, u know. [quote="Crimson Wizard":29jl9sf0][quote="Karnizero":29jl9sf0]2.- Do you know how to make a kind of animated INTERPIC, like the Doom 1 one? Or even like the Quake 2 one? It is possible to make almost ANYTHING in progs. For example, I was making Travel Map for our KRPG project, that is instead of Hexen interpic a whole map appears where user moves cursor and points to its next location. If there's no other more suitable way to make an animated interpic (Furebrand and Janis mentioned something above), you can always do following: go to doom/cgame/intermission.vc. It is a classs for displaying intermission with interpic and things. Since you know coding, you probably won't have much troubles understanding general algorythm there. Notice, that drawing map with locations made available only for Doom 1 (by placing preprocessor #ifndef DOOM2 ) - check methods IM_InitNextLoc, IM_DrawNextLoc etc. Then, when you have general idea, you may change everything, I mean - EVERYTHING. Draw what you like, animate what you like, make user able to control what is happening here, whatever. As for Q2 style intermission, frankly I don't remember how it looks like, if you mean a thing similar to Q1, where you could see level from a camera above with stats displayed, I believe it is possible too, but will need a different apporach. I will take a look that VC. Yes, i know coding, but the hardest i have is to understand C sintax. I have been always programming a lot of VBasic, TCL and a bit less JAVA, and now i get trouble with Variable Types conversion and some sintax issues. For example: At VBasic, i can write:
int randomVariable = (1 + Rnd()) * 3 //Random Value between 1 and 3 (Integer)
In that case, the result of that operation, will result in a integer value (cause of data conversion). But i cannot do that at C. Thats maybe the only problem, cause i need to use random numbers in a part of my code. If you would explain me how to convert a float value integer, you would help me a lot. <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> Anyway, if at the VC code file you told me, there is no random() function usage, i wont have much touble. <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P --> [EDIT] [color=#00FF00:29jl9sf0]ANOTHER PROBLEM SOLVED: TITLEPIC & TITLEMAP:[/color:29jl9sf0] I made a [color=#0080FF:29jl9sf0]TITLEMAP[/color:29jl9sf0] instead of a [color=#0080FF:29jl9sf0]TITLEPIC[/color:29jl9sf0], using a 1024x768 size texture, and setting the [color=#FF00FF:29jl9sf0]PlayerStart[/color:29jl9sf0] at the required distance and height so it really seems a TITLEPIC.
Thu, 07 Aug 2008 03:25:58

Firebrand

[quote="Karnizero":2w3vnklr]Yes, i know coding, but the hardest i have is to understand C sintax. I have been always programming a lot of VBasic, TCL and a bit less JAVA, and now i get trouble with Variable Types conversion and some sintax issues. C is not that difficult, if you have some basic object oriented programming knowledge VavoomC should be straight forward IMO <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) -->, as for syntax, you'll get the hang of it after working with it for a while <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->. [quote="Karnizero":2w3vnklr]For example: At VBasic, i can write:
int randomVariable = (1 + Rnd()) * 3 //Random Value between 1 and 3 (Integer)
In that case, the result of that operation, will result in a integer value (cause of data conversion). But i cannot do that at C. Thats maybe the only problem, cause i need to use random numbers in a part of my code. ... Anyway, if at the VC code file you told me, there is no random() function usage, i wont have much touble. <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P --> To use random functions you'll need to use random() method if the value is a float, if it's an integer you'll use P_Random() method like this:
damage = ((P_Random() % 5) + 1) * 3;
damage is an integer variable, in this case, if you need to use it with floats you'll do something like this:
VectorRotateAroundZ(&dir, (Random() - Random()) * 45.0 / 2.0);
Hope this clears it out <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->, if it doesn't just let me know and I'll use another example, OK? [quote="Karnizero":2w3vnklr]If you would explain me how to convert a float value integer, you would help me a lot. <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> It's pretty simple, this method of conversion is known as casting of a variable in objective C <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->, it works like this, let's suppose you want to cast the damage variable above to float, then you would do something like this:
damage = ((P_Random() % 5) + 1) * 3;
// Let's declare our float variable here...
float f_dmg;
// OK, now let's get the value of damage into f_dmg variable, converting it to float with a casting...
f_dmg =  float(damage);
This way your value is now a float stored inside f_dmg! <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Hope this helps you out.
Thu, 07 Aug 2008 13:59:11

Karnizero

[quote="Firebrand":3ktycc7e][quote="Karnizero":3ktycc7e]Yes, i know coding, but the hardest i have is to understand C sintax. I have been always programming a lot of VBasic, TCL and a bit less JAVA, and now i get trouble with Variable Types conversion and some sintax issues. C is not that difficult, if you have some basic object oriented programming knowledge VavoomC should be straight forward IMO <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) -->, as for syntax, you'll get the hang of it after working with it for a while <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->. [quote="Karnizero":3ktycc7e]For example: At VBasic, i can write:
int randomVariable = (1 + Rnd()) * 3 //Random Value between 1 and 3 (Integer)
In that case, the result of that operation, will result in a integer value (cause of data conversion). But i cannot do that at C. Thats maybe the only problem, cause i need to use random numbers in a part of my code. ... Anyway, if at the VC code file you told me, there is no random() function usage, i wont have much touble. <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P --> To use random functions you'll need to use random() method if the value is a float, if it's an integer you'll use P_Random() method like this:
damage = ((P_Random() % 5) + 1) * 3;
damage is an integer variable, in this case, if you need to use it with floats you'll do something like this:
VectorRotateAroundZ(&dir, (Random() - Random()) * 45.0 / 2.0);
Hope this clears it out <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->, if it doesn't just let me know and I'll use another example, OK? [quote="Karnizero":3ktycc7e]If you would explain me how to convert a float value integer, you would help me a lot. <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> It's pretty simple, this method of conversion is known as casting of a variable in objective C <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->, it works like this, let's suppose you want to cast the damage variable above to float, then you would do something like this:
damage = ((P_Random() % 5) + 1) * 3;
// Let's declare our float variable here...
float f_dmg;
// OK, now let's get the value of damage into f_dmg variable, converting it to float with a casting...
f_dmg =  float(damage);
This way your value is now a float stored inside f_dmg! <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> Hope this helps you out. Yes, i understand. Really thanks. <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> But now i have a last question: How XML model definiton files works? I have downloaded the Vavoom models, but im getting trouble to adapt my "own" models to the XML files. My modes have more frames (arround 100 frames for "IDLE", "Attack", "Walk" and "Death"). I have understand a bit how the XML works, but i dunno if the frameset at the XML should be have the same frame number as the frame number at the VavoomC definition file for that monster. For example, the zombie, has at the "Spawn" state: POSS A 4 A_Look POSS B 4 But my model has arroun 20 frames for the "Spawn" (Idle) state. Does i need to set the "Spawn" state to have also 20 frames or XML file overrides the VavoomC frame numbers? I really dunno if i have explained...
Thu, 07 Aug 2008 14:03:19

guydudeperson

I don't know that Vavoom allows models to be interpolated yet(if they are). Its been requested a few times so they should show in the next release(I hope).
Thu, 07 Aug 2008 17:56:06

Firebrand

No, XML model definitions don't override progs states lists, if a monster has 2 idle frames you should use only 2 idle frames for the models you are using, select the most representative ones, Vavoom's development version has interpolations for models in a test phase, not yet commited to SVN repositories <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->. If you don't know which frames are what in your model, you can use any model viewer that supports MD2 format to select which frames would be the best ones to use, in the next release Vavoom will interpolate the frames to look "smooth" <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) -->. Model frame and actor frame indexes don't need to be the same, check the mancubus or archvile modeldefs to see how it works, it's very simple IMO. Remember that you need to set the model and actor names correctly, or your models won't work in-game. Hope this solves your problem <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->.
Thu, 07 Aug 2008 20:16:17

Janis Legzdinsh

You can have multiple model frames per single state, see Mancubus or most of the Heretic monster model definitions to see how it's done.
Fri, 08 Aug 2008 20:40:07

Firebrand

You don't need to remove any model frames nor define new frames in progs <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->, you only need to make something like this in your model XML definition, this comes directly from the mancubus model defs.
	<!-- Missile -->
                <state index="14" model="base"  frame_index="113" />
		<state index="14" model="base"  frame_index="114" inter="0.2" />
		<state index="14" model="base"  frame_index="115" inter="0.4" />
		<state index="14" model="base"  frame_index="116" inter="0.6" />
		<state index="14" model="base"  frame_index="117" inter="0.8" />
		<state index="15" model="base"  frame_index="118" />
		<state index="15" model="base"  frame_index="119" inter="0.5" />
		<state index="16" model="base"  frame_index="120" />
		<state index="17" model="base"  frame_index="117" />
		<state index="18" model="base"  frame_index="118" />
		<state index="18" model="base"  frame_index="119" inter="0.5" />
		<state index="19" model="base"  frame_index="120" />
		<state index="20" model="base"  frame_index="117" />
		<state index="21" model="base"  frame_index="118" />
		<state index="21" model="base"  frame_index="119" inter="0.5" />
		<state index="22" model="base"  frame_index="120" />
		<state index="23" model="base"  frame_index="117" />
Check the state index in this animations, check how "inter" is used, this is the time the extra frames will last, this number should be minor to the actual frame duration, to see the frame duration, you can check the mancubus.vc file and see the duration of the first frame of the missile animation, you can put any number of extra animations as long as the inter numbers aren't beyond the duration of the actual frame, hope my explanation is good enough and helps.
Fri, 08 Aug 2008 10:11:06

Karnizero

Thanks you both for the help. As i need to adapt the model frames to the actor real frames, then i cant use models for the monsters... <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: --> I will try to make sprites out of the models, as detailed as i can. <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> Same for weapons. -> Another four questions:
Fri, 08 Aug 2008 13:14:23

Firebrand

[quote="Karnizero":2cuvwqux]As i need to adapt the model frames to the actor real frames, then i cant use models for the monsters... <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: --> Why not? [quote="Karnizero":2cuvwqux]I will try to make sprites out of the models, as detailed as i can. <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) --> I think you could reconsider using MD2 model instead, but I don't exactly know why you aren't using them... [quote="Karnizero":2cuvwqux]
Fri, 08 Aug 2008 14:14:37

Karnizero

[quote="Firebrand":2sxp7fad][quote="Karnizero":2sxp7fad]As i need to adapt the model frames to the actor real frames, then i cant use models for the monsters... <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: --> Why not? My monsters MD2 models have a lot more frames than the Vavoom ones, so i really dunno if adapting the actor's frames at the source code will result on weird effects. For example, for the actor "Zombie", we got:
States {

Spawn:
     POSS A 4 A_Look
     POSS B 4
     Loop
The Vavoom models have also two frames (one for each actor's frame) for IDLE (or Spawn) State, BUT my model has arround 20 or 30 frames, so i need to increase the number of frames at the Actor's code:
States {

Spawn:
     POSS AAAAAAAAAA 4 A_Look
     POSS BBBBBBBBBB 4
     Loop
I cannot decrease the MD2 frame number. I'm using QuArK to do this, but deleting frames makes the model frame transition too bad (i have also deleted some frames already). For weapons, i think i can use models, cause they have not so much frames as monsters.
Mon, 11 Aug 2008 13:24:44

Karnizero

@ Firebrand: Te he enviado un mensaje privado... <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P --> [quote="Firebrand":246tu47j]You don't need to remove any model frames nor define new frames in progs <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->, you only need to make something like this in your model XML definition, this comes directly from the mancubus model defs.
	<!-- Missile -->
                <state index="14" model="base"  frame_index="113" />
		<state index="14" model="base"  frame_index="114" inter="0.2" />
		<state index="14" model="base"  frame_index="115" inter="0.4" />
		<state index="14" model="base"  frame_index="116" inter="0.6" />
		<state index="14" model="base"  frame_index="117" inter="0.8" />
		<state index="15" model="base"  frame_index="118" />
		<state index="15" model="base"  frame_index="119" inter="0.5" />
		<state index="16" model="base"  frame_index="120" />
		<state index="17" model="base"  frame_index="117" />
		<state index="18" model="base"  frame_index="118" />
		<state index="18" model="base"  frame_index="119" inter="0.5" />
		<state index="19" model="base"  frame_index="120" />
		<state index="20" model="base"  frame_index="117" />
		<state index="21" model="base"  frame_index="118" />
		<state index="21" model="base"  frame_index="119" inter="0.5" />
		<state index="22" model="base"  frame_index="120" />
		<state index="23" model="base"  frame_index="117" />
Check the state index in this animations, check how "inter" is used, this is the time the extra frames will last, this number should be minor to the actual frame duration, to see the frame duration, you can check the mancubus.vc file and see the duration of the first frame of the missile animation, you can put any number of extra animations as long as the inter numbers aren't beyond the duration of the actual frame, hope my explanation is good enough and helps. Yes, i think that will solve all problems i have with models. Thanks dude. <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D --> But i have another questions:
Mon, 11 Aug 2008 14:58:07

Firebrand

[quote="Karnizero":3rgy5kmk]@ Firebrand: Te he enviado un mensaje privado... <!-- s:P --><img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz" /><!-- s:P --> Ya lo he respondido Karnizero <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->. [quote="Karnizero":3rgy5kmk]
Mon, 11 Aug 2008 18:36:31

Janis Legzdinsh

1.26 has HIRESTEX support.
Tue, 12 Aug 2008 12:48:19

Karnizero

@ Firebrand: Thanks. [quote="Janis Legzdinsh":28mrtr7m]1.26 has HIRESTEX support. That's nice. <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
Tue, 16 Sep 2008 15:14:31

Mon

Thx for such a nice suggestion ... i really found this site great.

Back to the Vavoom Forum Archives