Author Topic: Create a turn based map?  (Read 3655 times)

Create a turn based map?
« on: April 13, 2021, 12:48:32 am »
Hi guys!

Do you know how i can make a turne based map or modify a  real time map? The engine determine this at the creation of the map, and l want to test a self made donjeon in turn based, but i dont find the solution in the scripts or in the mapper

Thanks for your help!

Re: Create a turn based map?
« Reply #1 on: April 13, 2021, 05:35:33 pm »
If is it to diffilcut, another stuff : modify the regen rate of Actions Points, but just for mob   ;D

It's very hard questions i know ^^

Offline Slowhand

  • Go for the eyes, Boo! Go for the eyes!
Re: Create a turn based map?
« Reply #2 on: April 14, 2021, 11:20:42 am »
Hi guys!

Do you know how i can make a turne based map or modify a  real time map? The engine determine this at the creation of the map, and l want to test a self made donjeon in turn based, but i dont find the solution in the scripts or in the mapper

Thanks for your help!

The user can decide they want to play a map rt or tb as long as it's instanced for them only. They can do this in client options, use foconfig.exe or other configs to set. So for a quest location it can be turned based without any change on server side.

Re: Create a turn based map?
« Reply #3 on: April 16, 2021, 07:36:07 pm »
Thanks Showhand! I know this, I have download the Server version of Reloaded 2 season, and I mod it for fun.

For quest i found this : MODE_DEFAULT_COMBAT

    /**< Get the location, allow turn based mode in it, and disable auto garbage, this way the player can revisit the map. */
    Location@ location = GetLocation(loc);
    if(player.Mode[MODE_DEFAULT_COMBAT] == COMBAT_MODE_TURN_BASED)
        SetTurnBasedAvailability(location);
    location.AutoGarbage = false;

But don't work when I copy this, because that's be modified? (location with coordonate?)

Do you know the script emplacement for definition of combat mode in game by default? (to forced the engine?)

I think it's in the Engine and i don't found.....

Do you know where is the code (script line?) to change the Caravan's combat mode at last?

Thanks for your help!
« Last Edit: April 16, 2021, 07:41:22 pm by KingR »

Re: Create a turn based map?
« Reply #4 on: April 16, 2021, 07:52:48 pm »
Can we add a line in the FonlineServer.cfg to change the default's combat mode?

My .cfg client (FOConfig) was already in TB
« Last Edit: April 16, 2021, 07:56:55 pm by KingR »

Re: Create a turn based map?
« Reply #5 on: April 17, 2021, 12:35:40 pm »
I found this :

You can collect all town Locations inside start() function and set turn based mode for every Map inside. Assuming that every town exists only in one copy:
Code: [Select]
array<uint> tbTowns = { LOCATION_Den, LOCATION_Klamath, LOCATION_Whatever };
for( uint t=0, tLen=tbTowns.length(); t<tLen; t++ )
{
    Location@ location = GetLocationByPid( tbTowns[t], 0 );
    if( valid(location) )
    {
        for( uint m=0, mLen=location.GetMapCount(); m<mLen; m++ )
        {
            Map@ map = location.GetMapByIndex(m);
            if( valid(map) )
            {
                map.SetTurnBasedAvailability( true );
            }
        }
    }
}

But I don't know where I can use this code, in main.fos for example?

Thanks for your patience x)