setting up building limits

Get some help with creating maps or modding.
Need a map editor or other tools, look here!
winsrp
Trained
Trained
Posts: 417
Joined: 14 May 2008, 17:00

setting up building limits

Post by winsrp »

How does

Multiplay/skirmish/rules.slo

and

Multiplay/script/multilim.slo

work together?

If I change the first one... yes limits are applied, but they are not the same as the limits screen.
If I change the second one... yes limits change on the limits screen, cool, but when playing they are not applied.

If I change both, then, all limits are applied, but with the fixed value that comes in rules.slo

So, the question is, how do you make limits in the limits screen applied, when they are not the same as the ones in rules.slo. (user moves the bar lower for example.)
winsrp
Trained
Trained
Posts: 417
Joined: 14 May 2008, 17:00

Re: setting up building limits

Post by winsrp »

testing testing

changing the rules.slo on the initialisedEvent from original to this... fixes the issue, it only applies the given limits instead of setting up new... but shouldn't this kind of code be removed from the source, since it does not works?

event initialisedEvent(CALL_GAMEINIT)
{
//set up the reticule buttons
addReticuleButton(OPTIONS);
addReticuleButton(CANCEL);
addReticuleButton(BUILD);
addReticuleButton(MANUFACTURE);
addReticuleButton(RESEARCH);
addReticuleButton(INTELMAP);
addReticuleButton(DESIGN);

playnum = 0;
while (playnum < 8)
{
enableStructure(command ,playnum); //make structures available to build
enableStructure(factory ,playnum);
// enableStructure(wall ,playnum);
// enableStructure(cornerWall ,playnum);
enableStructure(oilDerrick ,playnum);
enableStructure(powerGen ,playnum);
enableStructure(research ,playnum);

// setStructureLimits(factory, 5, playnum); // set structure limits
// setStructureLimits(powerGen,8, playnum);
// setStructureLimits(research,5, playnum);
// setStructureLimits(command, 1, playnum);
// setStructureLimits(commandrelay,1, playnum);
// setStructureLimits(cybfac, 5, playnum);
// setStructureLimits(vtolfac, 5, playnum);
playnum = playnum+ 1;
}

applyLimitSet(); // set limit options
}
i-NoD
Code contributor
Code contributor
Posts: 318
Joined: 30 Nov 2008, 00:42
Location: In the middle of nowhere

Re: setting up building limits

Post by i-NoD »

Dunno how you all came to this... the logic is pretty simple:
Multiplay/skirmish/rules.slo and .vlo
gives the default values for any skirmish game which can be overriden with the limiter values in
Multiplay/script/multilim.slo and .vlo
The catch is that the limiter values are applied only after you press 'Apply' button on the limiter screen.

Removing values from either of files surely will break the game Image
winsrp
Trained
Trained
Posts: 417
Joined: 14 May 2008, 17:00

Re: setting up building limits

Post by winsrp »

well i have just played a game from start to finish, from T1, doing ALL the researches, on a 7 vs 1 map... and it worked pretty good actually... the only bad thing is that for some reason factories limits only apply to me and AI builds a sh*t LOAD of factories. LOL.
i-NoD
Code contributor
Code contributor
Posts: 318
Joined: 30 Nov 2008, 00:42
Location: In the middle of nowhere

Re: setting up building limits

Post by i-NoD »

Glad you've noticed the issue. And a DEBUG build will bug you with asserts to death in that case.
winsrp
Trained
Trained
Posts: 417
Joined: 14 May 2008, 17:00

Re: setting up building limits

Post by winsrp »

well doing some trial an error i found out the following

#1 Multiplay/skirmish/rules.slo are the real in game limits if the limits screen is not touched.
#2 In order to have the same max ingame limits as the Multiplay/script/multilim.slo the Multiplay/skirmish/rules.slo file must be modified to replicate the same max values. So if you don't touch the limits on the map selection screen maxes are applied and computer does not build that ton of factories.
#3 In order to fix it, insted of calling the manual limits on the Multiplay/skirmish/rules.slo, the Multiplay/script/multilim.slo limits should be called here, and applied to the game as initial max values.

Question

Can anyone make this code change, i know what to do, but I don't know where or how.
i-NoD
Code contributor
Code contributor
Posts: 318
Joined: 30 Nov 2008, 00:42
Location: In the middle of nowhere

Re: setting up building limits

Post by i-NoD »

The only differences I see are:

Code: Select all

setStructureLimits(oilDerrick, 	30,	0);
setStructureLimits(vtolpad, 	50,	0);
setStructureLimits(repair, 	5, 	0);
and a small desync in power gen value

Code: Select all

setStructureLimits(powerGen, 	10, 	0);
so you can't get
winsrp wrote:ton of factories
for AI using the default values. Still we should sync both files...

Btw using Multiplay/skirmish/rules.slo file gives the possibility to set some structure limit without showing the level on limiter screen (like HQ limit)...