Author Topic: FOnline SDK - Question  (Read 146198 times)

Offline wladimiiir

  • Rotator
  • Independent FOnline developer
Re: FOnline SDK - Question
« Reply #435 on: June 28, 2013, 02:28:35 pm »
How can I make encounters more frequent?
In worldmap_init.fos you can find lines of codes like this one:
table.AddEncounter( 10, 10030020 ).AddGroup( GROUP_Player, 0, 0 ).AddGroup( GROUP_Giant_Rats, 5, 15 ).Fighting( 0, 1 );
This is single encounter defined and the yellow 10 means chance of encountering it. If you want some encounter more frequently, increase this value.

There is also line like this one:
SetZone( 0, 0, TABLE_00_00, 0, TERRAIN_Mountain, CHANCE_Common, CHANCE_Common, CHANCE_Common );
This defines single zone on WM and chances of getting encounter in morning, afternoon and evening hours respectively. There are these values allowed (defined in worldmap.fos):
  • CHANCE_Forced
  • CHANCE_Frequent
  • CHANCE_Common
  • CHANCE_Uncommon
  • CHANCE_Rare
  • CHANCE_None

Re: FOnline SDK - Question
« Reply #436 on: June 29, 2013, 03:49:19 pm »
Ok I have this armor that makes me look like a ghoul when I wear it and if my server restarts my character wont be wearing the armor
how do I stop this from happening or at least what causes this to happen?

Offline wladimiiir

  • Rotator
  • Independent FOnline developer
Re: FOnline SDK - Question
« Reply #437 on: June 29, 2013, 04:22:03 pm »
Ok I have this armor that makes me look like a ghoul when I wear it and if my server restarts my character wont be wearing the armor
how do I stop this from happening or at least what causes this to happen?
1. How do you stop your server? Is it saved before you exit it?
2. Do you have the armor in armor slot after restart?
3. How do you set that wearing such an armor will change you to ghoul in script?

Re: FOnline SDK - Question
« Reply #438 on: June 29, 2013, 04:27:31 pm »
1.Yes
2.No after restart it gets removed unlike other armors
3.In object editor I changed the my armor's CritterType Male to 28 same for CritterType Female

It only happens if i use a skin like a ghouls or super mutant or gecko
but if i used a power armor skin it would remain on my character after restart or some other wearable item like leather armor
« Last Edit: June 29, 2013, 04:29:48 pm by Outlawries »

Offline Bartosz

  • Rotator
  • There'd better be a killer reason...
Re: FOnline SDK - Question
« Reply #439 on: June 29, 2013, 05:20:27 pm »
1.Yes
2.No after restart it gets removed unlike other armors
3.In object editor I changed the my armor's CritterType Male to 28 same for CritterType Female

It only happens if i use a skin like a ghouls or super mutant or gecko
but if i used a power armor skin it would remain on my character after restart or some other wearable item like leather armor

Check main.fos, critter_init, the else branch (line 980) - it does something for skin validation. Maybe this is what changes your skin?

Offline wladimiiir

  • Rotator
  • Independent FOnline developer
Re: FOnline SDK - Question
« Reply #440 on: June 29, 2013, 05:42:01 pm »
Check main.fos, critter_init, the else branch (line 980) - it does something for skin validation. Maybe this is what changes your skin?
This check validates skin only if his armor is not in SLOT_ARMOR. The question is why this armor is not in slot anymore when he restarts the server? ???

Re: FOnline SDK - Question
« Reply #441 on: July 02, 2013, 03:06:14 pm »
I was wondering how do I make traders in my sdk?

Re: FOnline SDK - Question
« Reply #442 on: July 02, 2013, 04:24:59 pm »
I think it has something to do with trader_table.fos. I can't tell you how to set it up though. :(

Re: FOnline SDK - Question
« Reply #443 on: August 13, 2013, 11:17:11 pm »
How do I connect to my server from another PC?

Re: FOnline SDK - Question
« Reply #444 on: August 21, 2013, 01:50:29 pm »
Is there any commands that would allow me to reset/redo quests?
If so where can I find the quest ID's?

Offline kompreSor

  • FOnline 3
Re: FOnline SDK - Question
« Reply #445 on: September 03, 2013, 02:19:25 pm »
How make turnbase in towns? (in BH, redding etc.)

Offline Wipe

  • Rotator
  • Random is god
Re: FOnline SDK - Question
« Reply #446 on: September 04, 2013, 12:08:01 pm »
How make turnbase in towns? (in BH, redding etc.)

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 );
            }
        }
    }
}
« Last Edit: September 04, 2013, 12:11:14 pm by Wipe »
Games are meant to be created, not played...

Re: FOnline SDK - Question
« Reply #447 on: September 05, 2013, 01:53:14 pm »
Got a few questions; forgive me if they've been answered already. I searched through the thread and didn't find anything relevant.

Before I start, I am completely new to this. I've managed to set up a server, log in and give my character admin access. Everything else is unknown to me, so if the answers could have as much detail as possible, that'd be completely fantastic.

1) Various files (for example, Locations.cfg) have no formatting whatsoever. When I open it up in notepad, it's just a word wall that would make a dyslexic commit suicide. Is there a tool, that I missed, which is used to view the various files of the SDK? It's a complete pain to filter through the lack of spacing.

2) I've managed to create a map. How would I use admin commands to teleport to the map? I haven't modified any files to refer to it, if that is of any importance. The map is called "AAAFirst".

3) How would I attach scripts to all objects of a particular type?

4) Is there a collection of example scripts with comments on what each part does? Without any documentation, it might as well be written in a dead language for a newb such as myself.  :-[

5) How do I assign an NPC a name? Do I have to create a new critter (Is that what they're referred to as?) with all the same stuff as a typical character, but just with the name changed? Or can I just go to a placed character and edit the name directly?

6) How would I add other maps to the list of ones you can visit, such as the ones directly outside a city?

Edit1 (05/09/2013, 13:59 GMT): 7) Where can I get the file "MAPS.TXT"? It's referenced in the "Locations.cfg" file, but there isn't one with the fo2238 source.

Thanks in advance.
« Last Edit: September 05, 2013, 03:00:50 pm by Majin »

Offline JovankaB

  • Rotator
  • JovankaB
Re: FOnline SDK - Question
« Reply #448 on: September 05, 2013, 02:33:50 pm »
1) Various files (for example, Locations.cfg) have no formatting whatsoever. When I open it up in notepad, it's just a word wall that would make a dyslexic commit suicide. Is there a tool, that I missed, which is used to view the various files of the SDK? It's a complete pain to filter through the lack of spacing.

That's most likely because the files have Unix-style line endings and Notepad doesn't show them correctly, because the program is complete crap. Use some better text/code editor, for example Notepad++.
« Last Edit: September 05, 2013, 02:38:34 pm by b__B »

Re: FOnline SDK - Question
« Reply #449 on: September 05, 2013, 02:47:55 pm »
That's most likely because the files have Unix-style line endings and Notepad doesn't show them correctly, because the program is complete crap. Use some better text/code editor, for example Notepad++.

I love you.