Forged Alliance Forever Forged Alliance Forever Forums 2016-08-28T03:04:46+02:00 /feed.php?f=53&t=13010 2016-08-28T03:04:46+02:00 2016-08-28T03:04:46+02:00 /viewtopic.php?t=13010&p=133687#p133687 <![CDATA[Re: adaptive canis]]> viewtopic.php?f=53&t=13014

Statistics: Posted by CookieNoob — 28 Aug 2016, 03:04


]]>
2016-08-28T00:06:40+02:00 2016-08-28T00:06:40+02:00 /viewtopic.php?t=13010&p=133677#p133677 <![CDATA[Re: adaptive canis]]> Statistics: Posted by Lieutenant Lich — 28 Aug 2016, 00:06


]]>
2016-08-27T22:51:30+02:00 2016-08-27T22:51:30+02:00 /viewtopic.php?t=13010&p=133667#p133667 <![CDATA[Re: adaptive canis]]>

This afternoon I made a new version of New Zeta Wonder, the map is relatively symmetrical compared to wonder (suprisingly) so it's a feasable task to do it.

Statistics: Posted by CookieNoob — 27 Aug 2016, 22:51


]]>
2016-08-27T20:34:04+02:00 2016-08-27T20:34:04+02:00 /viewtopic.php?t=13010&p=133659#p133659 <![CDATA[Re: adaptive canis]]>

Add the units (that you want to have like wreckage) like you would do if you wanted to add Civilians:
see http://wiki.faforever.com/index.php?tit ... _civilians
Instead of using NEUTRAL_CIVILIANS->INITIAL you should use ARMY_15->Optional_Wreckage (or different group name)


Now that you have a group with the units, you can add the code to spawn them.
You ofcourse need a new option inside your _options file.

Inside your CreateResources function you can add the following code (outside of the for loop)
Code:
ScenarioInfo.Options.optional_wrecks = ScenarioInfo.Options.optional_wrecks or 1

Code:
if ScenarioInfo.Options.optional_wrecks == 1 then
    ScenarioUtils.CreateArmyGroup('ARMY_15', 'Optional_Wreckage ', true)
end

The 3rd argument "true" turns the armygroup into wrecks.

Statistics: Posted by KeyBlue — 27 Aug 2016, 20:34


]]>
2016-08-27T19:59:20+02:00 2016-08-27T19:59:20+02:00 /viewtopic.php?t=13010&p=133657#p133657 <![CDATA[Re: adaptive canis]]> Statistics: Posted by Lieutenant Lich — 27 Aug 2016, 19:59


]]>
2016-08-27T22:42:00+02:00 2016-08-27T15:26:25+02:00 /viewtopic.php?t=13010&p=133640#p133640 <![CDATA[Re: adaptive canis]]> Hilly Plateau Ultimate

known bugs: currently no bugs known

v0002: changed a small typo

Statistics: Posted by CookieNoob — 27 Aug 2016, 15:26


]]>
2016-08-27T01:32:54+02:00 2016-08-27T01:32:54+02:00 /viewtopic.php?t=13010&p=133616#p133616 <![CDATA[Re: adaptive canis]]> thx very much!!

So V0001 is ready for release ^^ now I only have to get Downlords client to work xD

Statistics: Posted by CookieNoob — 27 Aug 2016, 01:32


]]>
2016-08-27T01:28:05+02:00 2016-08-27T01:28:05+02:00 /viewtopic.php?t=13010&p=133615#p133615 <![CDATA[Re: adaptive canis]]> Which was very badly explained if i might add :p. Had to try several combinations to recreate the situation.
The only reason why the hydro's spawned when "disabled high mass" was chosen, was because you just spawn everything. Even if you disabled the hydro's, you would get them.



When giving the default value for one of your options, you don't actually get that value when a player doesn't change anything (everything default). You just get a nil value.

To solve this, you just need to put this at the start of your CreateResources function :

Code:
ScenarioInfo.Options.automex = ScenarioInfo.Options.automex or 1
ScenarioInfo.Options.mirrormex = ScenarioInfo.Options.mirrormex or 1
ScenarioInfo.Options.hydroplus = ScenarioInfo.Options.hydroplus or 1

This'll keep the set value or put in your default value (always 1 here because the keys of your default values are all 1)

You can remove the following code now, since it just disguised the issue. It was probably an attempt to solve it without knowing what was actually wrong.
Code:
        if(mirrormex1 != 1 and mirrormex1 != 2) then
            mirrormex1 =1;
        end



Next i suggest to also remove this (not sure what the point of it was):
Code:
      if(Armies < 4) then
         doit = false;
      end

This piece of code says that you should never spawn anything when there are less than 4 players. So you can't play with 3 players. And when playing with 2, you can't have the extra hydro's.


Finally i would suggest to not use your HydroPlus 'magic' but instead give both hydro's this value in the _save file:
Code:
remove        ['SpawnWithArmy'] = STRING( 'Hydroplus' ),

add                    ['hydroplus'] = BOOLEAN( true ),

This would be a lot cleaner, since hydroplus has nothing todo with the amount of armies you spawn.


Then you can simply write this:
Code:
if (tblData.resource and not tblData.SpawnWithArmy) then
    -- standard resources, spawn it
    doit = true;
elseif (tblData.resource and ScenarioInfo.Options.hydroplus == 1 and tblData.hydroplus) then
    -- extra hydro, spawn it
    doit= true;
elseif (tblData.resource and tblData.SpawnWithArmy) then
.
.
.

Statistics: Posted by KeyBlue — 27 Aug 2016, 01:28


]]>
2016-08-27T00:46:36+02:00 2016-08-27T00:46:36+02:00 /viewtopic.php?t=13010&p=133609#p133609 <![CDATA[Re: adaptive canis]]> Statistics: Posted by CookieNoob — 27 Aug 2016, 00:46


]]>
2016-08-27T00:29:15+02:00 2016-08-27T00:29:15+02:00 /viewtopic.php?t=13010&p=133608#p133608 <![CDATA[Re: adaptive canis]]>
Code:
ScenarioFramework.SetPlayableArea('AREA_1' , false)


Running the map gave an issue regarding this function.
I commented the line out and that seems to have solved the team problem.


A quick look at the map showed me that AREA_1 was set to 0,0,0,0.
So either make a correct Area or don't do SetPlayableArea

Statistics: Posted by KeyBlue — 27 Aug 2016, 00:29


]]>
2016-08-27T15:30:38+02:00 2016-08-27T00:10:14+02:00 /viewtopic.php?t=13010&p=133606#p133606 <![CDATA[adaptive canis]]>
Furthermore there are some lobby options that allow for some customization of the map before the game launches. Currently implemented are the options to disable the adaptive spawning of mexes (and spawn a fixed configuration, very similar to canis 4v4), putting an additional hydro on the hill on the sides and some configuration for the adaptive spawning.

However, there are the bugs that I just cant track down:
1) Solved: (thanks to KeyBlue) if the adaptive spawning is active, the hydros on the hill are not spawned. If the fixed spawn is active (second option) the hydros will spawn when selected to. I dont know why they dont spawn when the adaptive option is chosen.

2) Solved: (thanks to KeyBlue) for some reason all players are put in separate teams. I.e. independent of the game settings, the game will always be FFA. This is a major issue that has to be solved. Since this is the first time I did something with lua/FAmapeditor/scripting I dont really see a realistic chance to find out what causes this on my own.


It is planned to add an option to have some salem wrecks in the middle of the map or a stratbomber wreck on the sides. (I have no idea how to do so yet though)


Help is greatly appreciated! Feedback too.


If you think that this concept is a good idea, post below or like the post. If this sort of map is accepted, I will also do this other maps with symmetrical distributions of spawn positions and mexes. It was planned for Wonder and maybe also for Wonder open NA, but due to the assymetrical distribution of mexes, starting locations and reclaim this is really a painful thing to do. If some mapper would redo that and put the markers on the map in a symmetrical way, I will do that immidiately :)


If other maps are requested I will see what I can do and if it is worth the effort.

Statistics: Posted by CookieNoob — 27 Aug 2016, 00:10


]]>