Need help with AI on maps with more than 8 startpoints!

Interesting mapping tools and mapping help.

Moderator: Morax

Need help with AI on maps with more than 8 startpoints!

Postby Hanzimann » 13 Apr 2017, 19:55

All my earlier maps shows "yes" for AI markers in the map info. But now when i wanted to make a map with 10 players i couldn't open it in Hazard X markereditor, because it only work with 8 startpoints! I have tried to place land, air and naval path nodes on the map in the official map editor and have experimented a bit with "chains" on that but it did not work. I thought that the path nodes should be linked in the masterchain in the save file to work like this:
---
['AirPN01'] = {
['hint'] = BOOLEAN( true ),
['type'] = STRING( 'Air Path Node' ),
['adjacentTo'] = STRING( 'AirPN02 AirPN03 AirPN07 AirPN08 AirPN10 AirPN13 AirPN16' ),
['color'] = STRING( 'ffffffff' ),
['graph'] = STRING( 'DefaultAir' ),
['prop'] = STRING( '/env/common/props/markers/M_Path_prop.bp' ) ['orientation'] = VECTOR3( 0, -0, 0 ),
['position'] = VECTOR3( 100.5, 30, 120.5 ),
---
Maybe another markereditor or there is another way to program it. Want all my maps to show "yes" to AI markers in the map info.
Hope somebody can help :?: !!!
Hanzimann
Crusader
 
Posts: 14
Joined: 22 Mar 2017, 17:08
Has liked: 0 time
Been liked: 0 time
FAF User Name: Hanzimann

Re: Need help with AI on maps with more than 8 startpoints!

Postby Sprouto » 13 Apr 2017, 22:54

I can help.

Here is the summary of what you must do.

You'll need a text editor (Notepad++).

Every map has 4 files associated with it.

The map itself (.SCMAP) - the geography itself
The save (_save) - holds all the markers
The scenario (_scenario) - control information for the map
The script (_script) - special code that runs on this map

Since Hazard will not edit any map with more than 8 starts on it - you need to fool it into thinking there are only eight. You'll need to edit the scenario file.


You'll notice a line in your scenario file that looks like this;

armies = {'ARMY_1', 'ARMY_2', 'ARMY_3', 'ARMY_4', 'ARMY_5', 'ARMY_6', 'ARMY_7', 'ARMY_8', 'ARMY_9', 'ARMY_10', 'ARMY_11'},

comment this line out by putting two dashes at the front of that line.


Secondly, you'll need to add a line that looks exactly the same BUT has only the first 8 armies, like this;

armies = {'ARMY_1', 'ARMY_2', 'ARMY_3', 'ARMY_4', 'ARMY_5', 'ARMY_6', 'ARMY_7', 'ARMY_8''},

This one should NOT have the two dashes at the start of the line.


When finished, what you should have will look much like this;

--armies = {'ARMY_1', 'ARMY_2', 'ARMY_3', 'ARMY_4', 'ARMY_5', 'ARMY_6', 'ARMY_7', 'ARMY_8', 'ARMY_9', 'ARMY_10', 'ARMY_11'},
armies = {'ARMY_1', 'ARMY_2', 'ARMY_3', 'ARMY_4', 'ARMY_5', 'ARMY_6', 'ARMY_7', 'ARMY_8'},

Save these changes.


Open the Hazard marker editor - Voila ! - You may now edit the markers. You'll notice that Hazard shows the additional armies with '?' instead of the usual start position marker. They can be moved around just like the others, they just 'look different'.

When editing is finished, simply remove the two dashes from the original armies list and put them in front of the shorter armies list. Your original number of armies is re-enabled for game play.
Sprouto
Priest
 
Posts: 366
Joined: 08 Sep 2012, 05:40
Has liked: 54 times
Been liked: 74 times
FAF User Name: Sprouto

Re: Need help with AI on maps with more than 8 startpoints!

Postby aaxlleex » 14 Apr 2017, 00:26

@Hanzimann

Did you figure it out?

If not, I can help as well.
User avatar
aaxlleex
 
Posts: 9
Joined: 09 Mar 2017, 20:39
Has liked: 3 times
Been liked: 5 times
FAF User Name: Axle

Re: Need help with AI on maps with more than 8 startpoints!

Postby Hanzimann » 14 Apr 2017, 05:16

Thanks buddy ! It worked and where pretty easy to solve!!! :)
Hanzimann
Crusader
 
Posts: 14
Joined: 22 Mar 2017, 17:08
Has liked: 0 time
Been liked: 0 time
FAF User Name: Hanzimann


Return to Mapping

Who is online

Users browsing this forum: No registered users and 1 guest