Mod Question Repository... Questions come in, answers go out - Page 18

Mod Question Repository... Questions come in, answers go out

Resources to get you going on your new project, or to help you over some emergent problems during your development cycle.

Moderator: Moderators

Locked
deathexile
Posts: 2
Joined: 16 Nov 2007, 22:12

Post by deathexile »

snipawolf, you saved me from decades of playing a great mod against a boring enemy. Now i just have to lower the AI handicap (set it at 100 to see if it would do anything on KAI. Just made the AI build radars faster).
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

No problem. RAI kicks ass :P
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

Post by [Krogoth86] »

How is the speed determined with which Anti- / Nuke-Missiles are built? I noticed two different buildspeeds between the Antinuke and Catalyst but I cannot tell as to why this is. There's no FBI tag, nothing in the weapon definition and I couldn't find anything obvious in the script...

All I could get to know is that there must be a variable for it somewhere as the buildtime is independent from the costs as the costs per second will follow the adjustments you make in the weapon definition...
User avatar
DOT
Posts: 138
Joined: 26 Nov 2007, 15:39

Post by DOT »

Snipawolf wrote:No problem. RAI kicks ass :P
not rly it dosent build storages
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

[Krogoth86] wrote:How is the speed determined with which Anti- / Nuke-Missiles are built? I noticed two different buildspeeds between the Antinuke and Catalyst but I cannot tell as to why this is. There's no FBI tag, nothing in the weapon definition and I couldn't find anything obvious in the script...

All I could get to know is that there must be a variable for it somewhere as the buildtime is independent from the costs as the costs per second will follow the adjustments you make in the weapon definition...
Tried reload time?
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

Post by [Krogoth86] »

KDR_11k wrote:Tried reload time?
Damn - you really miss the easy solutions when trying too hard...
Or maybe I just spent too much time today in endless corpse listings... :mrgreen:

Thank you! :-)
User avatar
Snipawolf
Posts: 4357
Joined: 12 Dec 2005, 01:49

Post by Snipawolf »

DOT wrote:
Snipawolf wrote:No problem. RAI kicks ass :P
not rly it dosent build storages
On my mod the basic econ IS the storage. :P
User avatar
rcdraco
Posts: 781
Joined: 22 Nov 2006, 02:50

well

Post by rcdraco »

Can someone give me a small example of how the new variables are made, and how to use them?
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

What new variables?
User avatar
rcdraco
Posts: 781
Joined: 22 Nov 2006, 02:50

yea

Post by rcdraco »

The SVN variables for Scriptor, team-var, global-var, etc.
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

set 1024-1031 are unit specific vars,
set 2048-2111 are team specific,
set 3072-3135 are ally specific and
set 4096-8191 are common global vars.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

From my costomized exptype.h:

Code: Select all

#define UNIT_VAR		1024	//8 vars
#define TEAM_VAR		2048	//64 vars
#define ALLY_VAR		3072	//64 vars
#define GLOBAL_VAR		4096	//1024 vars
The vars are addressed by increasing the number (1024, 1025, 1026, ...). Their scopes should be obvious. You can set the unit vars of other units with get UNIT_VAR(-unitID, value) and get them with get UNIT_VAR(unitID).
User avatar
rattle
Damned Developer
Posts: 8278
Joined: 01 Jun 2006, 13:15

Post by rattle »

Hmm..

Code: Select all

static const int GLOBAL_VAR_COUNT = 4096;
static const int GLOBAL_VAR_START = 4096;
static const int GLOBAL_VAR_END = GLOBAL_VAR_START + GLOBAL_VAR_COUNT - 1;
What ever, it's not very likely to run out of global vars now is it.
User avatar
rcdraco
Posts: 781
Joined: 22 Nov 2006, 02:50

ok

Post by rcdraco »

Let me just describe what I'm shooting for.

In this units Create(), I want it to set a *THIS PLAYER ONLY* variable to 1.

When that variable is set to 1, units will get new weapons.

[Via limiting that unit to 1, it's a functional upgrade center.]
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Playxer is called team in Spring. The rest is trivial.
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

Post by [Krogoth86] »

So it's me again... :wink:

1.)
Is there a way to give walls (units in general would be cool too) a height? Currently it's just measured according to the footprint (-> spheric hitbox) and a bit from the scaling of the model to use (I have to models with 2x2 footprint but when displaying the hitbox by pressing b one is way bigger as the model also is way taller). I tried the height tag you can set for the corpse but it seems to be something Spring doesn't care about anymore. Something like footprinty would be cool for this although maybe this will become obsolte when there will be custom hitboxes which I saw on a screen some while ago...

2.)
Now seriously - can someone explain me what Spring doesn't like about "old school" empty objects? :mrgreen:
I think you know it that when you for example take a unit from Unit Universe which was made for TA and so most probably via 3dobuilder you'll have some problems when you emit fx. To show what I mean:
Image
On the left you see a model with empty objects via Upspring and on the right those made in 3dobuilder. You might also have seen the effect of totally stretched things like here:
Image
I'm asking about this because this can give you a headache when doing 3do models: You have to assemble / texture them in 3dobuilder, put in empty objects in Upspring and then make a ground plate in 3dobuilder again. Your model now also will crash Upspring as something gets messed up when resaving the empty objects in 3dobuilder (delete them again and everything is fine). So does anyone know something about this and maybe an easy and fast way to make the empty objects "functional" again with having to redo them in Upspring...

Thanks in advance...
asasaass
Posts: 3
Joined: 01 Dec 2007, 16:39

Post by asasaass »

Is it possible to alter the height an aircraft fly?
It would be good for space based mods,such as FF
[Krogoth86]
Posts: 1176
Joined: 23 Aug 2007, 19:46

Post by [Krogoth86] »

asasaass wrote:Is it possible to alter the height an aircraft fly?
It would be good for space based mods,such as FF
You already tried cruisealt=160; (or another value of your choice) in the unit's FBI? I don't know if this is another thing Spring ignores but it's worth a try...
User avatar
yuritch
Spring 1944 Developer
Posts: 1018
Joined: 11 Oct 2005, 07:18

Post by yuritch »

Spring definitely obeys CruiseAlt tag, I've tried values up to 1500 and they work.
Only thing to consider when using such extreme altitudes is weapon ranges. Your plane can easily go out of range of ground-based AA (which is useful by itself).
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Negative values work too by the way. Might be useful for a Perimeter mod.
Locked

Return to “Game Development Tutorials & Resources”