Page 1 of 3

Weapon Variables: what do they do?

Posted: 12 Sep 2006, 03:23
by FoeOfTheBee
I've made a wiki page modeled on the FBI variable descriptions page. Spring weapons have diverged enough from OTA that Maestro's tutorial doesn't seem adequate anymore.

I only filled in a few variables - if you know about weapons variables, please go by and share some info.

http://taspring.clan-sy.com/wiki/Weapon ... scriptions

Posted: 12 Sep 2006, 03:33
by Argh
Um, I could probably help with this, as I've actually read the sourcecode. There are a LOT of OTA variables that simply aren't recognized by Spring.

Posted: 12 Sep 2006, 04:35
by Caydr
I'll come back in an hour and see what you've done, then see if there's anything I can add.


~~~

scratch that, i'll do it in the morning

Posted: 12 Sep 2006, 07:24
by Argh
Er, it's been a bit longer than an hour, but I had to get home from work and eat a quick dinner ;)

I'll look over the current list, and then list what I know...

Posted: 13 Sep 2006, 02:22
by SpikedHelmet
The wiki is looking good but it is a giant clusterfuck and is very confusing... there are absolutely no descriptions about what kind of variable is needed (ie if the tagline is boolean and requires only a 1 for yes or 0 for no, or whether it requires a specific number, what do those numbers mean, etc)

EDIT: Yes, I meant to say 1 or 0 not 1 or 2...

Posted: 13 Sep 2006, 02:31
by esteroth12
spring (and C++ and C and Java) uses a 0 for no :P

also, theres a page much like this already

Posted: 13 Sep 2006, 02:32
by Caydr
OK, here goes. Nobody touch it, I'm going through it now...

Posted: 13 Sep 2006, 03:13
by SpikedHelmet
You bastard! I've been going through it for half an hour!

Posted: 13 Sep 2006, 03:40
by Snipawolf
Those need explanations..

Posted: 13 Sep 2006, 04:01
by Caydr
Your explanations were inaccurate or at least very lacking, assuming those were from you.

Done all the general ones, going to do the repulsor/shield ones now, then add the ones that aren't listed.

Posted: 13 Sep 2006, 04:21
by Snipawolf
Hehe, I meant the one above me (if anyone got confused, not the one all the way on top of the topic)

Posted: 13 Sep 2006, 04:55
by Caydr
OK, done my editing. I've probably missed a few general tags, but I've written longish descriptions for everything and given examples. Also split it into weapon / shield sections. Prettied-up the tables too.

Posted: 13 Sep 2006, 05:15
by Hunter0000
If no one has done it by tomorrow afternoon I might throw up the shield intercept explanaions.. since I understand those after my extensive playing around =P

Posted: 13 Sep 2006, 17:57
by Caydr
Starting to wonder if, in most cases, Spring ignores the rendertype and just makes a best-guess based on the weapon's attributes. For instance, rendertype 0 or 1 apparently work with lasers, even though only 0 should work.

Posted: 13 Sep 2006, 20:17
by FoeOfTheBee
Caydr wrote:Starting to wonder if, in most cases, Spring ignores the rendertype and just makes a best-guess based on the weapon's attributes. For instance, rendertype 0 or 1 apparently work with lasers, even though only 0 should work.
I´ve had the same experience with lasers - either 0 or 1 work.

And there's this in WeaponDefHandler.h:

Code: Select all

#define WEAPON_RENDERTYPE_MODEL 1
#define WEAPON_RENDERTYPE_LASER 2
#define WEAPON_RENDERTYPE_PLASMA 3
#define WEAPON_RENDERTYPE_FIREBALL 4
and this in WeaponDefHandler.cpp:

Code: Select all

if(weaponDefs[id].name.find("disintegrator")!=string::npos){	//fulhack
		weaponDefs[id].visuals.renderType = WEAPON_RENDERTYPE_FIREBALL;}
	else if(weaponDefs[id].visuals.modelName.compare("")!=0){
		weaponDefs[id].visuals.renderType = WEAPON_RENDERTYPE_MODEL;}
	else if(beamweapon){
		weaponDefs[id].visuals.renderType = WEAPON_RENDERTYPE_LASER;}
	else{
		weaponDefs[id].visuals.renderType = WEAPON_RENDERTYPE_PLASMA;}
Which makes me think that the correct rendertype for lasers is 2, not that I really have much comprehension of what's going on in the source here.

Posted: 13 Sep 2006, 20:45
by KDR_11k
EDIT: Oops, misread that. So it actually reads the def to spot what it expects and then sets rendertype for you?

Posted: 13 Sep 2006, 21:01
by FoeOfTheBee
Ok, on second read of WeaponDefHandler.cpp, I think it is setting the rendertype for weapons that have beamweapon=1 as 2, and ignoring the rendertype in the tdf.

Though someone more clueful than I should confirm this.

Posted: 13 Sep 2006, 21:23
by Hunter0000
ok.. shield intercept tags edited.. how do those look? confusing/sense making?

Posted: 13 Sep 2006, 22:25
by Caydr
Makes no sense to me yet :cry:

Posted: 13 Sep 2006, 22:58
by Hunter0000
I could make a much more propper diagram.. but it would not fit into that article...

EDIT: if I have time a bit later, Il make a new page (with more detailed instructions/diagrams) and link to that, unless anyone objects.

EDIT2: Links up.. how does that work?