fodev.net

FOnline Development => Questions and Answers => Topic started by: Demenise on March 16, 2013, 11:31:05 am

Title: A bunch of nooby questions
Post by: Demenise on March 16, 2013, 11:31:05 am
Question A: What files do i have to delete so completely wipe my server without stuffing up my sdk.

Question B: How can i change the health per level up like as in lets say my endurance is 5 and i want it to be 10hp per level

Thanks, in advance
Title: Re: A few nooby questions
Post by: JovankaB on March 16, 2013, 11:52:31 am
A:
scripts\*.fosb
scripts\*.fosp
maps\*.fomapb
save\*.fo
save\clients\*.client
save\clients\*.client_deleted
save\clients\clients_list.txt
save\clients\last_id.txt
Title: Re: A few nooby questions
Post by: Lidae on March 16, 2013, 01:24:39 pm
B: Have a look at parameters.fos, in the changedParam_Experience function.
Title: Re: A few nooby questions
Post by: Demenise on March 17, 2013, 08:16:06 am
Thanks For the great answers. :)

Question C: How to change the location of a town on the world map.
Title: Re: A few nooby questions
Post by: Mr Feltzer on March 17, 2013, 09:19:15 am
C: look at maps/ GenerateWorld.cfg

Quote from: Example
@   305   464   293 # The Den/Broome
     
305 is the location ID
464 is x Location on world map
293 is y Location on world map
anything past the # is a comment and dosent matter
Title: Re: A few nooby questions
Post by: JovankaB on March 17, 2013, 09:23:26 am
If you change coordinates in GenerateWorld.cfg you will have a new location on the new spot though.

If you want to move existing location you can use this:
Code: [Select]
void location_move (Critter& cr, int id, int x, int y)
{
    if (x >= 0 && y >= 0 && x < (__GlobalMapWidth * __GlobalMapZoneLength) && y < (__GlobalMapHeight * __GlobalMapZoneLength))
    {
        if (id > 0 && valid(GetLocation(id)))
        {
            Location@ loc = GetLocation(id);
            loc.WorldX = uint16(x);
            loc.WorldY = uint16(y);
            cr.Say(SAY_NETMSG, "Location " + id + " moved to [" + loc.WorldX + "," + loc.WorldY + "].");
        }
        else
        {
            cr.Say(SAY_NETMSG, "Invalid location Id.");
        }
    }
    else
    {
        cr.Say(SAY_NETMSG, "Invalid world map coordinates.");
    }
}
Title: Re: A few nooby questions
Post by: Demenise on March 18, 2013, 10:25:35 am
Question D: How do i get rid of the text that pops up as soon as i enter a town like the den and redding its in russian text in the message box?
Title: Re: A few nooby questions
Post by: Berko on March 18, 2013, 11:05:05 am
The easier things is I thing to search message you got in scripts.
Not sure it's that but (..and I check on a old SDK revision):
in "main.fos" you have "map_critter_in" function, called each time someone enter a map.
In this function you have a call to "OnCitterMapIn" (It look Russian have the same level in English as French (me at least) ^^)
In "nopvp_maps.fos" you can see in the function that you have "cr.SayMsg( SAY_NETMSG, TEXTMSG_TEXT, 1 );" line.
In FOTEXT.msg the string number 1 is "Включен nopvp режим.". Google say us that it mean : "Nopvp enabled mode." (as in english text part the n°1 don't exist in my revision)

If it's that you can desactivate pvp mode or change city where nopvp is enable or add an English message.
For the first you have a global variable to change "__NoPvpMaps".
For the second you can change global variable in nopvp_maps.fos : the "noPvpMaps" array.
For the last option you have to add English message if not present and set English language.

It can also be a message that is trigger when NPC see you, you walk in a zone, etc .. but the description you do look like to be a nopvp message.
Title: Re: A few nooby questions
Post by: Demenise on March 18, 2013, 11:41:16 am
damn i thought it was the pvp text at first aswell but i checked and its not so i took some images of what it says in redding and the den appreciated the help thanks for all the support.
http://postimage.org/image/8hduapp99
Title: Re: A few nooby questions
Post by: Berko on March 18, 2013, 03:40:56 pm
We search these strings in *.msg

Code: [Select]
# Сообщение на входе в Реддинг
{5430}{}{По приближению к городу Вы замечаете, что северная его часть огорожена длинной стеной.}

# Post at the entrance to Redding
{5430} {} {On the approach to the town you notice that the northern part of the long fenced wall.}

and
Code: [Select]
#
# Den entrance messages
#

{1050}{}{Вы испытываете странное чувство полной разрухи.}
{1051}{}{Где-то в глубине души вы очень рады, что покинули это место.}

#
# Den entrance messages
#

{1050} {} {You feel a strange sense of complete ruin.}
{1051} {} {Somewhere in my heart you are very glad to leave this place.}

So we got the 5430 message and 1050 message from FOTEXT.msg

We can search directly "5430" or "1050" on scripts.

We found :
in map_redding_outer.fos
Code: [Select]
#define STR_REDDING_IN    ( 5430 )

void _MapInit( Map& reddOut, bool firstTime )
{
    reddOut.SetEvent( MAP_EVENT_IN_CRITTER, "_ReddingCritterIn" );
}

void _ReddingCritterIn( Map& denBus, Critter& player )
{
    if( player.IsPlayer() )
        player.SayMsg( SAY_NETMSG, TEXTMSG_TEXT,  STR_REDDING_IN );
}

It's a map event.

and in map_den_bus.fos

Code: [Select]
#define STR_DENBUS_IN     ( 1050 ) // "Âû èñïûòûâàåòå ñòðàííîå ÷óâñòâî ïîëíîé ðàçðóõè."
#define STR_DENBUS_OUT    ( 1051 ) // "Ãäå-òî â ãëóáèíå äóøè âû î÷åíü ðàäû, ÷òî ïîêèíóëè ýòî ìåñòî."

void _DenBusInit( Map& denBus, bool firstTime )
{
    denBus.SetEvent( MAP_EVENT_IN_CRITTER, "_DenBusInCritter" );
    denBus.SetEvent( MAP_EVENT_OUT_CRITTER, "_DenBusOutCritter" );
}

void _DenBusInCritter( Map& denBus, Critter& player )
{
    if( player.IsPlayer() )
        player.SayMsg( SAY_NETMSG, TEXTMSG_TEXT,  STR_DENBUS_IN );
}

void _DenBusOutCritter( Map& denBus, Critter& player )
{
    if( player.IsPlayer() )
        player.SayMsg( SAY_NETMSG, TEXTMSG_TEXT,  STR_DENBUS_OUT );
}

A map event too.

You can comment event, or comment the "SayMsg" part or change map if you don't need script associated.
Title: Re: A few nooby questions
Post by: Demenise on March 20, 2013, 01:20:49 am
Thanks for that  :D

Question E: How do I edit an encounter for example I change Unity vs Enclave to Raiders vs Marauders?
Title: Re: A few nooby questions
Post by: Bevolard on March 20, 2013, 05:51:41 am
Ill add my question as well

When I go to talk or attack an npc if I am close enough to it I will always walk making melee impossible in real time how can I make it so I am running instead of walking when I am close to my target.
Title: Re: A few nooby questions
Post by: Berko on March 20, 2013, 10:26:44 am
E: Check in worldmap_init.fos. You can add your own group and set them in worldmap and remove some other group. (it's related to worldmap.fos)

-----

in config.fos you have that
Code: [Select]
    __AlwaysRunMoveDist     = 1;
    __AlwaysRunUseDist      = 1;
Set value you want (here player walk when distance is less or equal to 1 hex).

Title: Re: A few nooby questions
Post by: Bevolard on March 20, 2013, 11:50:11 am
Berko your a Legend thanks.
Title: Re: A few nooby questions
Post by: Demenise on March 21, 2013, 06:47:47 am
Yeah thanks berko :)
Title: Re: A few nooby questions
Post by: Bevolard on March 21, 2013, 04:03:01 pm
I also have another question I need help with

Ok I want to have armor that gives me a skin like lets say I wear this leather armor and it would give me a super mutant skin I know it has been done but I have no idea how to do it.
Title: Re: A few nooby questions
Post by: Mr Feltzer on March 22, 2013, 06:28:44 am
I also have another question I need help with

Ok I want to have armor that gives me a skin like lets say I wear this leather armor and it would give me a super mutant skin I know it has been done but I have no idea how to do it.

In Object editor, when you create armour it will have CrMale and CrFemale down the bottom. in both of those box' you can place the skin ID's for the critter Ids you want the armour to make you look like. and sorry for no screenshots Im lazy
Title: Re: A few nooby questions
Post by: Bevolard on March 22, 2013, 12:35:19 pm
That is an awesome answer thanks didn't need screen shots :D