Trouble with script for prebuild bases

Interesting mapping tools and mapping help.

Moderator: Morax

Trouble with script for prebuild bases

Postby Avon » 25 Mar 2017, 22:26

Hi all,

I am trying to make a new 9 player map for the Phantom-X mod with a prebuild base setting.
For this setting I have an options script that allows the host to start the game with simple prebuild bases.
I am using a script by DUCK_42 as a basis (he uses it in the phantom bunny roanoke v9 and v 11 maps)

Here is my problem, the script works fine for bases 1,2,3-4,8 and 9, but not for 5,6 and 7.
bases 5,6 and 7 are located at the bottom of the map, but I have no idea if that influences anything.

These are the lines is giving trouble I think for the 3 bad locations.

I find the following error in the game.log

I think Duck42 hit the same trouble at some point, because in his v11 map he added the following code:


I want to do the same solution, but I have no idea how to find out if a mex position is "bad" and how to compensate the x and y coordinates.
I checked all my maps mex position and all are alligned correctly.

Anyone have any clue how I might even start solving this?

I already tried:
Replacing all the mex points on the troubled islands and
moving the army marker.

Thanks for any help.
Avon
 
Posts: 3
Joined: 25 Mar 2017, 22:04
Has liked: 0 time
Been liked: 0 time
FAF User Name: Avon

Re: Trouble with script for prebuild bases

Postby Avon » 25 Mar 2017, 22:27

Sorry as i am a new user I am not allowed to paste ANY code. Great fucking feature when you have questions about scripting.

warning: BeginSession() failed: Invalid posX passed in
stack traceback:
[C]: in function `CreateResourceBuildingNearest'
...unny_abyss.v0002\nine_phantom_bunny_abyss_script.lua(364): in function `SpawnBetterPreBuiltT2BasesV9'
...unny_abyss.v0002\nine_phantom_bunny_abyss_script.lua(64): in function `OnPopulate'
This is the error thrown in the game log.
Avon
 
Posts: 3
Joined: 25 Mar 2017, 22:04
Has liked: 0 time
Been liked: 0 time
FAF User Name: Avon

Re: Trouble with script for prebuild bases

Postby KeyBlue » 25 Mar 2017, 22:57

You could make a pastepin with the log and the map script.
Then post the link in pieces so its not a real link, but we can find the code by putting the pieces together;

something like : pastebin .. .com .. / .. code
or whatever creative way you want to do it in.

EDIT: can you attach the complete map too? (or is that also restricted for you?)
User avatar
KeyBlue
Priest
 
Posts: 403
Joined: 28 Jan 2016, 01:06
Has liked: 140 times
Been liked: 93 times
FAF User Name: KeyBlue

Re: Trouble with script for prebuild bases

Postby Avon » 25 Mar 2017, 23:03

I fixed it, structure spawning was based of a island marker close to the main islands. Some of these markers where farther out resulting in the problems.
Avon
 
Posts: 3
Joined: 25 Mar 2017, 22:04
Has liked: 0 time
Been liked: 0 time
FAF User Name: Avon


Return to Mapping

Who is online

Users browsing this forum: No registered users and 1 guest