Author Topic: how use area respaw in map editor?  (Read 388 times)

LKWeeze

  • Newbie
  • *
  • Posts: 4
    • View Profile
how use area respaw in map editor?
« on: February 22, 2019, 06:04:19 pm »

how to put box and pragmium respaw in 2x2 or 4x4 areeas, im using map editor :)

ai_enabled

  • AtomicTorch Founder
  • Hero Member
  • *****
  • Posts: 1382
    • View Profile
Re: how use area respaw in map editor?
« Reply #1 on: February 24, 2019, 04:49:32 am »
Hello!

Well, it's a bit complicated!

The spawn script should be attached to a server zone (which could be "painted" over world tiles). This way the spawn script knows exactly where it should attempt to (re)spawn objects.

We have plenty of pre-defined zones (for each biome, radtowns, etc) but they have specific spawn scripts attached to them to ensure the proper spawn density, respawn intervals (usually every few minutes) and other parameters (such as tile padding between the objects of the same type).

You can read the scripts to understand how they're organized - all the relevant source code is located in <game folder>/Core/Core.cpk/Scripts/Zones

If you want to have 100% spawn of Pragmium source in a relatively small area (like 4x4 tiles) then you need to create a new spawn script file (C#) with spawn interval for example 1 tile (to ensure 100% spawn) and create a new zone script file (also C#) linking this spawn script file. Then you need to paint this new zone over the world. To test it you can use test button in the Editor Zones menu or run the game server (so it will actually initiate the game world and trigger the full world simulation including regular execution of all the zone scripts).

Regards!

LKWeeze

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: how use area respaw in map editor?
« Reply #2 on: February 24, 2019, 10:57:18 pm »
Hello!

Well, it's a bit complicated!

The spawn script should be attached to a server zone (which could be "painted" over world tiles). This way the spawn script knows exactly where it should attempt to (re)spawn objects.

We have plenty of pre-defined zones (for each biome, radtowns, etc) but they have specific spawn scripts attached to them to ensure the proper spawn density, respawn intervals (usually every few minutes) and other parameters (such as tile padding between the objects of the same type).

You can read the scripts to understand how they're organized - all the relevant source code is located in <game folder>/Core/Core.cpk/Scripts/Zones

If you want to have 100% spawn of Pragmium source in a relatively small area (like 4x4 tiles) then you need to create a new spawn script file (C#) with spawn interval for example 1 tile (to ensure 100% spawn) and create a new zone script file (also C#) linking this spawn script file. Then you need to paint this new zone over the world. To test it you can use test button in the Editor Zones menu or run the game server (so it will actually initiate the game world and trigger the full world simulation including regular execution of all the zone scripts).

Regards!

Thanks for replying, but I have a duviva, I'm lazy about scripting among other things, I can not open the cpk file to find the scripts folder, can you recommend a program that does this?
thank you

ai_enabled

  • AtomicTorch Founder
  • Hero Member
  • *****
  • Posts: 1382
    • View Profile
Re: how use area respaw in map editor?
« Reply #3 on: February 25, 2019, 02:54:21 pm »
Basically, this is a simple Zip archive - just with a custom file extension.
There is a special CMD script in the same folder. Just double click it and it will do everything for you :-)