Author Topic: WorldMap changes don't work (new encounters)  (Read 3809 times)

WorldMap changes don't work (new encounters)
« on: June 02, 2013, 02:19:06 pm »
So i was messing around creating new encounters in coord [ 0 , 0 ]

Everything is supposed to be ok. No errors, no warnings, everything is clear. Then ingame i look around for my new encounter and i have 2 problems.
1- Its supposed to be only coast, mountain, cave and city encounter AND there is still desert encounters.
2- I deleted every encounter except mine and i still have molerats and tribals. It makes no sense to me.
Ofcourse i deleted the server saves. It should load my changes perfectly..
Here is all the info i  added/edited.


-First of all, added my new npc to " _npc_pids.fos " in this case:

#define NPC_PID_Terminator               ( 524 )

-Then, added a new group to the list in " worldmap.fos "

#define GROUP_ROBOTS1                      ( 124 )

-Next thing i did was editing in " worldmap_init.fos ", hte table " Arrok_M " aka nÂș6 in tables defines.

// Arrok_M (Arroyo Klamath Trade Route)
@table = @EncounterTables[ TABLE_Arrok_M ];
table.AddLocationPid( LOCATION_MountainEncounter1 );
table.AddLocationPid( LOCATION_MountainEncounter2 );
table.AddLocationPid( LOCATION_CavernEncounter0 );
table.AddLocationPid( LOCATION_CavernEncounter2 );
table.AddLocationPid( LOCATION_CoastEncounter1 );
table.AddLocationPid( LOCATION_CoastEncounter2 );
table.AddLocationPid( LOCATION_CoastEncounter3 );
table.AddLocationPid( LOCATION_CityEncounter1 );
table.AddEncounter( 10, 10033000 ).AddGroup( GROUP_ROBOTS1, 2, 4 ).AddGroup( GROUP_Player, 0, 0 ).Fighting( 0, 1 );


also, here is the group in " worldmap_init.fos "

// Robots1
@group = @EncounterGroups[ GROUP_ROBOTS1 ];
group.TeamNum = 33;
group.Position = POSITION_CONE;
group.Spacing = 2;
group.AddCritter( 524 ).Dialog( 5043 ).Script( "mob@_MobInit" )
.AddItem( PID_f3LASERR, 1, 1, SLOT_HAND1 )
.AddItem( PID_MICRO_FUSION_CELL, 0, 200, SLOT_INV );
group.AddCritter( 524 ).Dialog( 5043 ).Script( "mob@_MobInit" )
.AddItem( PID_f3PLASMAR, 1, 1, SLOT_HAND1 )
.AddItem( PID_MICRO_FUSION_CELL, 0, 200, SLOT_INV );
group.AddCritter( 524 ).Dialog( 5043 ).Script( "mob@_MobInit" )
.AddItem( PID_GATLING_LASER, 1, 1, SLOT_HAND1 )
.AddItem( PID_MICRO_FUSION_CELL, 0, 200, SLOT_INV );


More info:

from worldmap_init.fos
SetZone( 0, 0, TABLE_Arro_M, 0, TERRAIN_Coast, CHANCE_Frequent    );

from FOGM.MSG

# Encounter Table 6
{10033000}{}{Some Robots}


PS: yes, they have 2 new guns but they are perfectly added to protos and FOOBJ.MSG, everything is allright previously tested.

Offline wladimiiir

  • Rotator
  • Independent FOnline developer
Re: WorldMap changes don't work (new encounters)
« Reply #1 on: June 03, 2013, 08:27:44 am »
You can try to delete worldmap.fosb, worldmap.fosp files to force server to recompile them (or use Clean.bat to clean all compiled sources) and see what happens. If it is still there, then maybe you have some duplicate definition of encounters (tables, zones,...) in your worldmap_init script file. Try to search for TABLE_Arrok_M, whether you don't find it defined twice (same for SetZone( 0, 0 ...)).

Re: WorldMap changes don't work (new encounters)
« Reply #2 on: June 03, 2013, 11:41:55 am »
TABLE_Arrok_M
TABLE_Arro_M
sorry for my english.

Re: WorldMap changes don't work (new encounters)
« Reply #3 on: June 03, 2013, 11:57:47 am »
Pretty damn right! Actually, i had 3 fails.

First, as you said, i had a duplicate (SOMEHOW, LOL) of the original table down lost in the script. I deleted it.

Second, in tables defines i had Arro_M instead of Arrok_M

Third, in FOGM.MSG i had set table pid 6 which is actually wrong because Arrok_M is pid 10

So i just fixed theese problems and DONE! :D yay!

Thanks a lot Mike, a lot. :)

Re: WorldMap changes don't work (new encounters)
« Reply #4 on: June 03, 2013, 12:00:00 pm »
PS: it works perfectly! everything!

PS2: thanks Tab10id too

Offline codave

  • Professional Noob Trainer
Re: WorldMap changes don't work (new encounters)
« Reply #5 on: June 12, 2013, 09:58:05 am »
It's the little things, always.

The other day I spent an hour trying to figure out why a script I wrote wasn't having any effect in-game.

Turns out I was editing my backups, not the directory the server actually compiled from...

:::facepalm:::