Minor Code Documentation Request

Minor Code Documentation Request

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Minor Code Documentation Request

Post by Argh »

Sorry to bug y'all... I asked AF first, but he doesn't have commit access to the changelog...

Please document the following tags, and their usage / paths in Changelog.txt:

shownanoframe
shownanospray
nanocolor
impulseBoost
craterMult
craterBoost


Also, the following line (from UnitDefHandler.cpp) seems redundant, and could probably be removed. If nothing else, it'd be trivial to remove it from the relevant mods- such things are a modder's job, imo, not Spring's... if you want me to fix that one-liner in XTA, just lemme know, and I'll post the file.

if(ud.builder && !ud.buildSpeed) //core anti is flagged as builder for some reason
ud.builder=false;


And... hey, I didn't know this... I guess I've never had this bug, because I keep all of my weapons defined...

while(ud.weapons.size()<a){
if(!weaponDefHandler->GetWeapon("NOWEAPON")) {
info->AddLine("Error: Spring requires a NOWEAPON weapon type to be present as a placeholder for missing weapons");
break;
} else
ud.weapons.push_back(UnitDef::UnitDefWeapon("NOWEAPON",weaponDefHandler->GetWeapon("NOWEAPON"),0,float3(0,0,1),-1,0,0,0));
}

...therefore, I'll change NullWeapon (the weapon class I put into NanoBlobs for placeholder purposes) to NOWEAPON, so that NanoBlobs is closer to being compliant with Spring.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Ah, thanks, so that's what the no nano tags are called.
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

My guess:

Shownanoframe: whether or not the unit will appear in stages as it does now, or just appear when completed, for mods that don't exist in the TA universe.

shownanospray: whether or not a nanospray shows up

nanocolor: probably an R G B thing just like rgbcolor. So if you want a blue nanospray, "nanocolor=0 0 1;". This is probably overridden by that other tag that shows team colored nanospray.

Impulseboost: dunno
cratermult: something to do with crater depth, lots of fun to play with
craterboost: same as above
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

normally when shownanoframe=0; the unit appears completed when construction starts. It's upto the scripter to script the build animation.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Tested tags with newest version of Spring I could get my paws on:

Code: Select all

[nanospray]
{
allow_team_colours=0;
shownanoframe=0;
shownanospray=0;
nanocolor=0;
}
I would think this would result in units appearing only when 100% built. This is not what happens. Instead, I get team-colored nanospray.
Gnomre
Imperial Winter Developer
Posts: 1754
Joined: 06 Feb 2005, 13:42

Post by Gnomre »

shownanoframe, shownanospray, and nanocolor are FBI tags.. You need to put them in each unit and each builder respectively for them to work. When Shownanoframe=0 the unit appears solid, completely done as soon as you start building, so an animation must be run through in Create().
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Ohhhhh. All right.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Post by AF »

nanocolor also takes the form that team colour does, so nanocolor=0; wont work, you have to specify RGB values which I believe would mean nanocolor=0 0 0; like in the map smf's in ranges 0-1
User avatar
FoeOfTheBee
Posts: 557
Joined: 12 May 2005, 18:26

Post by FoeOfTheBee »

It would be nice if there were mod-wide default settings that the FBI tags would override.
Post Reply

Return to “Engine”