fodev.net

FOnline Development => Questions and Answers => Topic started by: Hunky on September 01, 2010, 11:27:28 pm

Title: FOnline SDK - Question
Post by: Hunky on September 01, 2010, 11:27:28 pm
I want to ask, how to make my char admin? Also someone tried it out?

I saw in FOnlineServer.cfg lines:

Code: [Select]
# Keys for accesses
# Aviable four access mode: client (default on login), tester, moder, admin
Access_client=000000 00000000
Access_tester=
Access_moder=
Access_admin=

I don't know how to set it, it says "Keys" so i thought it will be something with keyboard but i saw numbers in client, so can someone help me?
Title: Re: FOnline SDK - Question
Post by: Cpt.Rookie on September 01, 2010, 11:38:34 pm
What worked for me:

- in FOnlineServer.cfg set
Code: [Select]
Access_admin=blablarestart server.

Log in and in console write
Quote
~getaccess admin blabla

"Access changed" msg should appear and after entering command
Quote
~myinfo
you should have access level "administrator".

Title: Re: FOnline SDK - Question
Post by: Hunky on September 01, 2010, 11:51:17 pm
Thank you.
Title: Re: FOnline SDK - Question
Post by: cerberix on September 02, 2010, 09:12:49 am
Does anyone know what is the command to change the SPECIAL stats and skills?
Title: Re: FOnline SDK - Question
Post by: Saumax on September 02, 2010, 10:36:42 am
you must change variables in order to do it, check scripts to know what vars
Title: Re: FOnline SDK - Question
Post by: Ghosthack on September 02, 2010, 11:14:24 am
~param 0 [0-6] [value] for special stats.

For skills, it's different than for 2238 most likely, so try, or find some documentation.
Title: Re: FOnline SDK - Question
Post by: cerberix on September 02, 2010, 03:29:49 pm
~param 0 [0-6] [value] for special stats.

For skills, it's different than for 2238 most likely, so try, or find some documentation.

Thanks for answer.
I find command to change skills.
~param 0 200 %

0      SK_SMALL_GUNS
1      SK_BIG_GUNS
2      SK_ENERGY_WEAPONS
...

~param 0 201 300 - you get 300% of big guns.

~param 0 72 xxx - heal HP.
Title: Re: FOnline SDK - Question
Post by: Hololasima on September 02, 2010, 04:16:30 pm
Thanks for answer.
I find command to change skills.
~param 0 200 %

0      SK_SMALL_GUNS
1      SK_BIG_GUNS
2      SK_ENERGY_WEAPONS
...

~param 0 201 300 - you get 300% of big guns.

~param 0 72 xxx - heal HP.

Where you found these IDs on health, skills and etc ?
Title: Re: FOnline SDK - Question
Post by: Ghosthack on September 02, 2010, 04:42:43 pm
Where you found these IDs on health, skills and etc ?

_defines.fos
Title: Re: FOnline SDK - Question
Post by: Hunky on September 02, 2010, 05:50:59 pm
Also I have another question . . . how to spawn items? I need to find all commands but don't know where :C.
Title: Re: FOnline SDK - Question
Post by: Saumax on September 02, 2010, 06:09:14 pm
there is such fine help file, its in russian but commands are normaly written, if i remember correctly page about command is 4 of first tab
Title: Re: FOnline SDK - Question
Post by: cerberix on September 02, 2010, 06:54:53 pm
Also I have another question . . . how to spawn items? I need to find all commands but don't know where :C.

~additemself x y

x = ID item (APA MK2 is 349)
y = number of item

~additemself 349 2

This command give you 2 APAs MK2 in your inventory.
Title: Re: FOnline SDK - Question
Post by: Ghosthack on September 02, 2010, 07:33:38 pm
and list of item PIDs can be found in _itempid.fos
Title: Re: FOnline SDK - Question
Post by: cerberix on September 03, 2010, 03:59:16 pm
and list of item PIDs can be found in _itempid.h

Where is "_itempid.h"? I can't find this.

I have a question. What is the command to select perk? Is there a sniper perk and better criticals?
How to teleport to different locations?
Title: Re: FOnline SDK - Question
Post by: Ghosthack on September 03, 2010, 04:13:56 pm
_itempid.fos
Too used to C/C++ header files :)
Title: FOnline SDK Question
Post by: randomizr on September 03, 2010, 08:22:23 pm
ok first of all thx for answere
and i wont go there its rly no fun to play on a donator paradise
Title: Re: FOnline SDK - Question
Post by: Bugi on September 03, 2010, 11:46:05 pm
Do you can send me a admin command's for this sdk? Sorry for my anglish.
Title: Re: FOnline SDK - Question
Post by: Wipe on September 04, 2010, 12:28:09 am
Do you can send me a admin command's for this sdk? Sorry for my anglish.

http://tab10id.alpclub-miet.ru/commands.html
Title: Re: FOnline SDK - Question
Post by: Bugi on September 04, 2010, 12:52:34 am
Thx for that  :D
Title: Re: FOnline SDK - Question
Post by: KraftikBG on September 04, 2010, 03:02:16 pm
Hello, i need to see coords of hexes , but i dont know how . please help .
Title: Re: FOnline SDK - Question
Post by: Bugi on September 04, 2010, 05:02:59 pm
Hi, how to teleport me in another plays?
Title: Re: FOnline SDK - Question
Post by: JovankaB on September 04, 2010, 06:41:01 pm
It looks like you will have to write the teleport/goto commands (and many, many other) on your own. Hurr durr.
If you didn't realize it yet, SDK is a TOOL for GAME DEVELOPERS people, not a toy for lazy kids.
Title: Re: FOnline SDK - Question
Post by: Grampy on September 05, 2010, 10:31:28 am
1. exit
Level the access: any.
Output from the game.
2. myinfo
Level the access: any.
Demand mapping a certain information about the current character - identifier, name, password, the level access.
3. gameinfo <type>
Level the access: moderator.
The demand mapping information about the game, where the type the inquired information (type) can be the following:
0) the statistics the use memory;
1) summary according to the current players in the game;
2) the statistics locations and maps;
3) the current temporary events;
4) the current state data anyData;
5) the statistics objects in the game;
4. id <name>
Level the access: moderator.
Demand the identifier [krittera] on its name (name).
Note:
It is not active at the given moment.
5. move <id> <hx> <hy>
Level the access: moderator.
To move character (id) into specific [geks] (hx, hy).
6. kill <id>
Level the access: moderator.
To kill character (id).
7. disconnect <id>
Level the access: moderator.
To disconnect character (id) from the server.
8. toglobal
Level the access: tester.
To leave by the current character on the global map.
9. respawn <id>
Level the access: moderator.
To resurrect character (id). If id it is equal to 0, then it means to resurrect the current character.
10. param <type> <num> <value>
Level the access: tester.
To change the parameter in the current character.
type must be equal to zero, num to the number the parameter, value to its new value.
11. getaccess <access name> <access password>
Level the access: any.
To change the level access.
access name - name access (client, tester, moder, admin).
access password - password access.
12. crash
Level the access: implementor.
To drop [servernoe] application.
13. additem <hx> <hy> <pid> <count>
Level the access: moderator.
To add object (pid, count) to specific [geks] (hx, hy).
14. additemself, ais <pid> <count>
Level the access: moderator.
To add object (pid, count) into the inventory.
15. addnpc <hx> <hy> <dir> <pid>
Level the access: moderator.
To add [Npts] (pid, dir) to specific [geks] (hx, hy).
16. addloc <wx> <wy> <pid>
Level the access: moderator.
To add location (pid) into the fixed point (wx, wy) on the global map.
17. reloadscripts
Level the access: administrator.
To [perezagruzit] all [servernye] scripts.
18. loadscript, load <script name>
Level the access: administrator.
To load or to [perezagruzit] the specific [servernyy] script (script name).
19. reloadclientscripts, rcs
Level the access: administrator.
To [perezagruzit] client scripts.
20. runscript, run <module name> <func name> <param0> <param1> <param2>
Level the access: administrator.
To neglect the special [servernuyu] function (module name, func name), with the specific parameters (param0, param1, param2).
21. reloadlocations
Level the access: administrator.
To [perezagruzit] the prototypes locations.
22. loadlocation <pid>
Level the access: administrator.
To load the specific prototype (pid) location.
23. reloadmaps
Level the access: administrator.
To [reload] the prototypes maps.
24. loadmap <pid>
Level the access: administrator.
To load the specific prototype (pid) map.
25. regenmap
Level the access: administrator.
To refresh map on which at the current moment is situated character. THIS IS A USEFUL COMMAND TO FIX ANY ACCIDENT WITH THE MAP.
Note:
On the given moment it works with the failures.
26. reloaddialogs
Level the access: administrator.
To [perezagruzit] all dialogues.
27. loaddialog <dialog name> <dialog id>
Level the access: administrator.
To load the specific dialogue (dialog name), under the specific identifier (dialog id).
28. reloadtexts
Level the access: administrator.
To [perezagruzit] all MSG files.
29. reloadai
Level the access: administrator.
To [perezagruzit] the bag [npts] (Bags.cfg).
30. checkvar, cvar <tid var> <master is npc> <master id> <slave id> <full_info>
Level the access: moderator.
To verify the state the specific play variable.
tid var - number variable;
master is npc - does appear master id from [Npts], 0 are not, rest - yes. If yes, then to master id automatically is added 5kk, t to the indexing [npts] begins from this number;
master id - primary identifier;
slave id - second identifier;
full_info - to derive complete information in terms the variable, 0 are not, rest - yes.
31. setvar, svar <tid var> <master is npc> <master id> <slave id> <value>
Level the access: moderator.
To verify the state the specific play variable.
tid var - number variable;
master is npc - does appear master id from [Npts], 0 are not, rest - yes. If yes, then to master id automatically is added 5kk, t to the indexing [npts] begins from this number;
master id - primary identifier;
slave id - second identifier;
value - new value variable.
32. settime <tmul> <year> <month> <day> <hour> <minute> <second>
Level the access: administrator.
To change play time.
tmul - the acceleration time, 0 - not to change;
year - year, 0 - not to change;
month - month, 0 - not to change;
day - day, 0 - not to change;
hour - hour;
minute - minute;
second - second;
33. ban <add, add+, delete, list> <user> <hours> <comment>
Level the access: moderator.
To [zabanit] the specific player.
add - to add into [ban] character;
add+ - to add into [ban] character and IP address;
delete - to remove from the list [zabanennykh];
list - to derive the list [zabanennykh];
user - name character;
hours - time blocking, in the hours;
comment - commentary, it is possible not to write.
34. deleteself <password>
Level the access: any.
To remove the current character.
35. changepassword, changepass <password> <new password>
Level of the access: any.
To change password for the current character.
36. dropuid, drop
Level the access: tester.
To drop anti-alto timer for this character, that it was possible to [perezayti] for another character without waiting the specific time.
Title: Re: FOnline SDK - Question
Post by: Wipe on September 05, 2010, 05:38:45 pm
(...) 5. movecrit <id> <hx> <hy>  (...)

It should be: move <id> <hx> <hy>
Title: Re: FOnline SDK - Question
Post by: Kamilos93 on September 18, 2010, 07:56:10 pm
I downloaded fonline sdk and I have a problem. If I run Fonline singleplayer/Fonline multiplayer I get black screen and nothing. I'm using window mode (not fullscreen). My resolution is 1024x768. After run aplication I see loading and after loading black screen, not main menu.
Title: Re: FOnline SDK - Question
Post by: jan0s1k on September 18, 2010, 09:03:08 pm
I downloaded fonline sdk and I have a problem. If I run Fonline singleplayer/Fonline multiplayer I get black screen and nothing. I'm using window mode (not fullscreen). My resolution is 1024x768. After run aplication I see loading and after loading black screen, not main menu.
you have to install some codecs (example K-lite codec pack (http://www.free-codecs.com/download/k_lite_codec_pack.htm))
Title: Re: FOnline SDK - Question
Post by: Kamilos93 on September 24, 2010, 06:20:01 pm
Where can I find all commands, numbers of items/critters? How can I open these files?
Title: Re: FOnline SDK - Question
Post by: jan0s1k on September 24, 2010, 07:15:21 pm
Where can I find all commands, numbers of items/critters? How can I open these files?

read this topic...
when you read ALL posts from this topic, you will know everthing ;p
Title: Re: FOnline SDK - Question
Post by: Kamilos93 on September 24, 2010, 07:32:17 pm
read this topic...
when you read ALL posts from this topic, you will know everthing ;p

Yes, there are all commands from help books but not all. Where are these commands?
Thanks for answer.
I find command to change skills.
~param 0 200 %

0      SK_SMALL_GUNS
1      SK_BIG_GUNS
2      SK_ENERGY_WEAPONS
...

~param 0 201 300 - you get 300% of big guns.

~param 0 72 xxx - heal HP.
So what?
Title: Re: FOnline SDK - Question
Post by: Cpt.Rookie on September 24, 2010, 07:37:07 pm
There are listed all built-in commands. If you want "more commands" you will have to be more specific and clarify what *exactly* do you want.
Next. You see there text "SK_SMALL_GUNS". What about performing search over the SDK folder?
Title: Re: FOnline SDK - Question
Post by: Kamilos93 on September 24, 2010, 07:49:45 pm
What folders/files can I find other commands as these "~param 0 201 300". Maybe command for lvl up or select perks/traits/hp etc.
Title: Re: FOnline SDK - Question
Post by: JovankaB on September 24, 2010, 07:53:45 pm
Did you read this thread at all?

_defines.fos

You should have param numbers there.
Title: Re: FOnline SDK - Question
Post by: Cpt.Rookie on September 24, 2010, 08:01:32 pm
What folders/files can I find other commands as these "~param 0 201 300". Maybe command for lvl up or select perks/traits/hp etc.
These commands are hardcoded in server application (in that magic .exe which is used for launching the server). Their list is in this post (http://fodev.net/forum/index.php?topic=8776.msg76490#msg76490). Or you can use my (little bit more polished) version at http://rookie.name/forum/viewtopic.php?f=23&t=93

If  you want more sophisticated commands than these, you will have to script them yourself.
Title: Re: FOnline SDK - Question
Post by: Kamilos93 on September 24, 2010, 08:11:06 pm
... I know about these commands but I don't know where can I find "_defines.fos" and OTHER commands (for lvl up, select trait, hp). What folder and where.
Title: Re: FOnline SDK - Question
Post by: Cpt.Rookie on September 24, 2010, 08:18:05 pm
First of all (don't get me wrong) one quote (from JovankaB)
Quote
It looks like you will have to write the teleport/goto commands (and many, many other) on your own. Hurr durr.
If you didn't realize it yet, SDK is a TOOL for GAME DEVELOPERS people, not a toy for lazy kids.

_defines.fos is a file. If you're not able to find a file in sdk file structure, any other discussion is pointless (from my side).
I guess that you can use ~param command to set your hp. Not sure about the rest, I was never really trying to do anything with SDK.

edit: important part made bold.
Title: Re: FOnline SDK - Question
Post by: Kamilos93 on September 24, 2010, 08:27:41 pm
First of all (don't get me wrong) one quote (from JovankaB)
_defines.fos is a file. If you're not able to find a file in sdk file structure, any other discussion is pointless.
I guess that you can use ~param command to set your hp. Not sure about the rest, I was never really trying to do anything with SDK.

... I know _defines.fos is file. But where this fucking file is? In server, client, tools, my fridge? Tell me where is this file, select location "X:/fonline_sdk/???
Title: Re: FOnline SDK - Question
Post by: JovankaB on September 24, 2010, 08:32:30 pm
Server\scripts

Holy Rat...
Title: Re: FOnline SDK - Question
Post by: Kamilos93 on September 24, 2010, 08:34:52 pm
Yes, yes I am guilty but if you gave locations faster it was not enough to talk.
Title: Re: FOnline SDK - Question
Post by: JovankaB on September 24, 2010, 08:37:35 pm
Dude I don't even have SDK on my PC, I had to connect to the repository to FIND IT for you.
Title: Re: FOnline SDK - Question
Post by: Izual on September 24, 2010, 09:29:39 pm
_defines.fos is a file. If you're not able to find a file in sdk file structure, any other discussion is pointless (from my side).

... I know _defines.fos is file. But where this fucking file is?

:/
Title: Re: FOnline SDK - Question
Post by: jan0s1k on September 27, 2010, 03:09:13 pm
:/

he should use "search tool" in Windows ;p
Title: Re: FOnline SDK - Question
Post by: Ol Shady on September 27, 2010, 03:13:47 pm
Hey there,

i got my SDK running about 1 hour ago. Now i wanted to know how i can use it too test a map i made. Is there a way to travel to a map file ?

Thanks
Title: Re: FOnline SDK - Question
Post by: Ghosthack on September 29, 2010, 09:11:49 pm
Hey there,

i got my SDK running about 1 hour ago. Now i wanted to know how i can use it too test a map i made. Is there a way to travel to a map file ?

Thanks

Easiest way is to replace one of the town maps, modoc for example with the map you want to test, then wipe the server (remove all world saves) and restart, go to modoc and you'll see your map.
Title: Need help with SDK again..
Post by: ZaAnihilator on October 01, 2010, 07:19:30 pm
Ok guys,i downloaded the game,i started it,and when i want to enter in fonline.exe,the screen appears and then dissapears,can you help me please?

Title: Re: FOnline SDK - Question
Post by: Surf on October 01, 2010, 08:42:20 pm
Merged.
Title: Re: FOnline SDK - Question
Post by: ZaAnihilator on October 04, 2010, 06:34:00 pm
Ok.my server is done,now how can people join my server?
Title: Re: FOnline SDK - Question
Post by: jan0s1k on October 04, 2010, 06:51:56 pm
Ok.my server is done,now how can people join my server?
lolz.. Are you Vedaras or Steve_Zizouza?
just give them your ip...
Title: Re: FOnline SDK - Question
Post by: Jimmy BoyX on October 08, 2010, 06:10:36 pm
It is possible to make other respawn zone?
Title: Re: FOnline SDK - Question
Post by: Surf on October 08, 2010, 06:11:41 pm
Ofcourse.
Title: Re: FOnline SDK - Question
Post by: Jimmy BoyX on October 08, 2010, 06:39:16 pm
Thank you. I will search how. Can I search in www.fonline.ru
Title: Re: FOnline SDK - Question
Post by: JovankaB on October 08, 2010, 09:11:48 pm
Better search in *.fos not in fonline.ru :) Respawn code is inside the replication.fos file, function ReplicateCritter.
Title: Re: FOnline SDK - Question
Post by: wreese2u on November 26, 2010, 05:26:47 am
How do i update my sdk, when i try to update it says:
Begin checking...
Server responce fail.
Checking end.
And the fonline server says:
FOServer::processes - connection timeout, client kicked, maybe bot.
Title: Re: FOnline SDK - Question
Post by: barter1113 on November 29, 2010, 08:43:35 am
How can I turn off bounty hunters in my server? I can't find anything about it in scripts.
Title: Re: FOnline SDK - Question
Post by: Ghosthack on December 12, 2010, 02:58:57 am
How can I turn off bounty hunters in my server? I can't find anything about it in scripts.

An easy way if you're unfamiliar with programming is opening town_supply.fos and replace the function bool IsValidForSupply(Critter& victim, Critter& hostile) with

bool IsValidForSupply(Critter& victim, Critter& hostile) { return false; }

This is of course not the best way, but works, and you can enable it again by reverting this.
Title: Re: FOnline SDK - Question
Post by: db2 on December 12, 2010, 07:53:14 pm
hi i have been wondering is it possable to change the port in the SDK from 4000 to 2238 every time i change it in the server CFG file it keeps logging on the TLA port i mean everything that needs to be done has been done
Title: Re: FOnline SDK - Question
Post by: Kamilos93 on December 15, 2010, 12:20:44 pm
hi i have been wondering is it possable to change the port in the SDK from 4000 to 2238 every time i change it in the server CFG file it keeps logging on the TLA port i mean everything that needs to be done has been done
SDK is from TLA, not 2238. I have a question. Are 3d models van buren in sdk?
Title: Re: FOnline SDK - Question
Post by: db2 on December 17, 2010, 10:48:35 pm
SDK is from TLA, not 2238. I have a question. Are 3d models van buren in sdk?
I got it running on 2238 server for about 5 minutes then computer shutdown....
and I dont think the 3D models are in the SDK if that helps
Title: How to add power armor to my server?
Post by: raynor009 on December 26, 2010, 10:32:58 am
How can i introduce the power armor to the server so it can be crafted?Or to recive it by a quest?

Merged /Wipe
Title: Re: FOnline SDK - Question
Post by: raynor009 on December 26, 2010, 11:10:38 am
I have a problem.I can't seem to be able to make an account and connect to the server.Why is that?
Title: Re: FOnline SDK - Question
Post by: raynor009 on December 26, 2010, 01:34:48 pm
Solved.
Title: Re: FOnline SDK - Question
Post by: raynor009 on December 26, 2010, 05:47:40 pm
How do i change the replication time?
Title: Re: FOnline SDK - Question
Post by: JovankaB on December 26, 2010, 06:26:37 pm
How do i change the replication time?

There is a function called "SetReplicationTime" in replication.fos file, and the line to change is:
Code: [Select]
if(cr.IsPlayer()) replTime=3; // 3 minutes
Why they don't set player's Stat[ST_REPLICATION_TIME] in some "player init" function and instead they set the value every time a player dies?
It's a mystery :)
Title: Re: FOnline SDK - Question
Post by: raynor009 on December 26, 2010, 07:19:12 pm
Tell me about it. Btw thx JovankaB

EDIT: Another question.My friend joined my server.We played for a while now then he disconected to change comabt to TB now he cant connect.Why? And also i tried disable the Bounty Hunters but after that server wont load script.I tried disable script from script.cfg but its the same story.

Thx in advance.
Title: Re: FOnline SDK - Question
Post by: JovankaB on December 26, 2010, 11:24:55 pm
Maybe your friend changed server port, I don't know...
And about the bounty hunters script, there is no error message in server log? If you messed up something in the scripts, there should be some info :)
Title: Re: FOnline SDK - Question
Post by: raynor009 on December 27, 2010, 10:25:27 am
[00:055] FOnline server, version 0393-9F.
[00:926] ***   Starting initialization   ****
[00:933] Script system initialization...
[00:958] Reload scripts...
[01:481] Script message: town_supply : Error : Unexpected token '{' : 34, 1.
[01:483] Script::LoadScript - Unable to Build module<town_supply>.
[01:483] Load module fail, name<town_supply>.
[02:358] Script::BindImportedFunctions - Fail to bind imported functions, module<main>, error<-19>.
[02:381] Reload scripts fail.

If i try to disable B Hunters.Cant i just change the time for them.If yes wher should i look?
Title: Re: FOnline SDK - Question
Post by: JovankaB on December 27, 2010, 01:13:44 pm
You messed up something in town_supply.fos, I would just redownload the file from repository.
Then simply add return; in the beginning of the CallTownSupply function:


void CallTownSupply(Critter& victim, Critter& hostile) // Export
{
   return; // town supply disabled, remove this line to enable it again

   if(IsValidForSupply(victim,hostile))
   {
      uint[] values={victim.Id,hostile.Id,0};
      ::CreateTimeEvent(__FullSecond+SUPPLY_TIME,"e_CallTownSupply",values,true);
   }
}


This will stop the town supply function before it does anything.

If you prefer to change the time when the supply comes, you have to modify this line in town_supply.fos:

#define SUPPLY_TIME               (Random(REAL_MINUTE(5),REAL_MINUTE(60)))

It means the time is random in a range between 5 and 60 minutes. So to change it, simply change the numbers.
Title: Re: FOnline SDK - Question
Post by: raynor009 on December 27, 2010, 05:00:27 pm
Thank you again JovankaB you wer very helpfull again.

But i have one more question?

I enabled the 3D moddles all was great.But how do i enable the HEAD slot?
Title: Re: FOnline SDK - Question
Post by: SmartCheetah on December 27, 2010, 05:38:58 pm
Thank you again JovankaB you wer very helpfull again.

But i have one more question?

I enabled the 3D moddles all was great.But how do i enable the HEAD slot?

Put // in _defines.fos before line
#define PLAYERS_3D_NO_HEAD     // No head slot

You can also disable vault suit to be default clothing on your toon by adding // in front of
#define PLAYERS_3D_VAULT_SUITE // Vault suite by default, not naked
Title: Re: FOnline SDK - Question
Post by: raynor009 on December 27, 2010, 06:43:11 pm
Thank you.But wher do i find the names for hats?And other helemts.I looked through itemsname file but i didnt see anything special.
Title: Re: FOnline SDK - Question
Post by: SmartCheetah on December 27, 2010, 07:54:56 pm
I'm not sure if they are implemented in SDK. You have to ask someone who are dealing with it more than me. Any ideas anyone? Or just tell him how to add it.
Title: Re: FOnline SDK - Question
Post by: raynor009 on January 04, 2011, 06:47:16 pm
How can i make a server status like the one on the forum?
Title: Re: FOnline SDK - Question
Post by: Wipe on January 04, 2011, 07:05:42 pm
How can i make a server status like the one on the forum?

http://fodev.net/forum/index.php?topic=2351.msg19771#msg19771
Title: Re: FOnline SDK - Question
Post by: jan0s1k on January 04, 2011, 07:07:21 pm
How can i make a server status like the one on the forum?
Quote from: cvet
For correct ping send 4 bytes to server - 0xFFFFFFFF, than receive 16 bytes, where 4 is current online, 4 bytes is uptime in seconds, others 8 is reserved. After server drop connection.
Quote
22:08:|52<@Ghosthack> Send 0xFFFFFFFF to server, it will respond with 16 bytes, where first 4 is current number online, 4 bytes is uptime in seconds, the other 8 is reserved.
You have to just write app in php or some other language ;)
btw, http://www.fonline.ru/forum/showthread.php?t=18181 (http://www.fonline.ru/forum/showthread.php?t=18181)
Thanks to Misiolap, Oxplay and CptRookie for help with php :)



http://fodev.net/forum/index.php?topic=2351.msg19771#msg19771

You speedy bastard!
Title: Re: FOnline SDK - Question
Post by: raynor009 on January 04, 2011, 07:43:36 pm
I dont want to make an aplication.I just want to make it PHP so it can get the statuts from website.
Title: Re: FOnline SDK - Question
Post by: jan0s1k on January 04, 2011, 07:59:00 pm
I dont want to make an aplication.I just want to make it PHP so it can get the statuts from website.
Not only php works for making image, you can make it in any language (as I think), for example java, etc
Title: Re: FOnline SDK - Question
Post by: raynor009 on January 04, 2011, 08:21:46 pm
Ok smart guy.So got any idea how to do it?
Title: Re: FOnline SDK - Question
Post by: jan0s1k on January 04, 2011, 09:26:39 pm
Ok smart guy.So got any idea how to do it?
Sure, first step is learn any language :) Then create socket in app, put results to text file (or make, that app will generate picture) and let some other tools to make it image and copy in your www server :)
Or just do it by PHP, but there is a lot of work ;p
Or use my server status (which can be deleted in any time, etc, but I think, that for now it will stay):
status.chosensoldiers.tk - for this, how to use it, go on fonline.ru (my post before is link)
Title: Re: FOnline SDK - Question
Post by: Wipe on January 04, 2011, 09:45:44 pm
Quote
<?php
$host = "94.23.237.127";
$port = "2238";

$socket = socket_create(AF_INET, SOCK_STREAM, 0) or die( "create\n" );
if( socket_connect( $socket, $host, $port ))
{
   $magic = pack( 'L', 0xFFFFFFFF );
   socket_write( $socket, $magic, strlen($magic) ) || die( "write\n" );
   $buf = '';
   socket_recv($socket, $buf, 16, MSG_PEEK );
   socket_close( $socket );
   if( strlen( $buf ) < 16 )
      die( "recv\n" );
   $data = unpack( 'L*', $buf );
   $online = $data[1];
   $uptime = $data[2];
   //print( "online: $online, uptime: $uptime seconds" );
   $img = imagecreate( 200, 50 );
   $bg = imagecolorallocate($img, 255, 255, 255);
   $black = imagecolorallocate($img, 0, 0, 0 );
   imagestring($img, 5, 0, 0, "Online: $online", $black );
   imagestring($img, 5, 0, 20, "Uptime: $uptime", $black );
   header('Content-type: image/png');
   imagepng( $img );
   imagedestroy( $img );
}
else
   die( "connect\n" );
?>

Seriously, it was 10m of work (including googling php socket function) - first (and probably last) time i used sockets in php... Yea, i know it's uberugly - CptRookie, don't say anything :>
Title: Re: FOnline SDK - Question
Post by: raynor009 on January 04, 2011, 10:02:41 pm
wtf is that?!? it look more complicated than c++.anyway thanks both of you for fast reply.
Title: Re: FOnline SDK - Question
Post by: Wipe on January 04, 2011, 10:30:07 pm
wtf is that?!? it look more complicated than c++.anyway thanks both of you for fast reply.

Complicated? You gotta be kidding me...
Title: Re: FOnline SDK - Question
Post by: raynor009 on January 04, 2011, 10:43:12 pm
Wut i newer had the patients to learn web programmin .All i learned was VB.net ,C# and now i try C++
Title: Re: FOnline SDK - Question
Post by: Surf on January 04, 2011, 10:47:13 pm
Next time you should be a bit more grateful when people are trying to help you instead of writing "wut" or "wtf".  ::)
Title: Re: FOnline SDK - Question
Post by: jan0s1k on January 04, 2011, 10:49:42 pm
Seriously, it was 10m of work (including googling php socket function) - first (and probably last) time i used sockets in php... Yea, i know it's uberugly - CptRookie, don't say anything :>
I'm poor :( My work takes something around one week ;p and it isn't too much changes between my and yours script (in my I have some things to, if server is offline don't wait this 30 seconds, but it doesn't work -.-)
Title: Re: FOnline SDK - Question
Post by: Misiolap on January 04, 2011, 10:57:05 pm
@raynor009: added some commentary for you.

Code: [Select]
<?php
$host 
"94.23.237.127"// Server IP address
$port "2238"// Server port

$socket socket_create(AF_INETSOCK_STREAM0) or die( "create\n" ); // create TCP Socket for server connection, abort on error
if( socket_connect$socket$host$port ) ) // connect to $host:$port
{
   
$magic pack'L'0xFFFFFFFF ); // create "magic query packet" (4 0xff bytes)
   
socket_write($socket$magic) || die( "write\n" ); // send "magic query packet" to server, abort on error
   
$buf '';
   
$recv socket_recv($socket$buf16MSG_PEEK ); // recieve server status (16 bytes)
   
socket_close($socket ); // disconnect
   
if( $recv 16 // abort on too short data recieved
      
die( "recv\n" );
   
$data unpack'V*'$buf ); // unpack recieved data - 4 Little Endian integers - 1st is current online, 2nd is uptime in seconds, others 2 are reserved
   
$online $data[1];  // see above
   
$uptime $data[2]; //see above
   //print( "online: $online, uptime: $uptime seconds" ); // debug ;)
   
$img imagecreate20050 ); // create 200x50px image
   
$bg imagecolorallocate($img255255255); // fill background with RGB(255,255,255) (white)
   
$black imagecolorallocate($img00); // allocate RGB(0,0,0) (black) for strings
   
imagestring($img500"Online: $online"$black ); // Write online count onto image
   
imagestring($img5020"Uptime: $uptime"$black ); // Write uptime onto image
   
header('Content-type: image/png'); // Set Content-type http headers, so browser knows it receives an image
   
imagepng$img ); // Output PNG image
   
imagedestroy$img ); // Deallocate image
}
else 
// Abort on failed connection
   
die( "connect\n" );
?>

Title: Re: FOnline SDK - Question
Post by: raynor009 on January 04, 2011, 11:14:51 pm
This is great! Thank you all of you!  8) .I also made a quick aplication but it isnt very advanced.Only says if its on or not.You can try it out bellow is link ;)

DOWNLOAD ME (http://ompldr.org/iNnVpMA)

Title: Re: FOnline SDK - Question
Post by: jan0s1k on January 05, 2011, 02:37:55 pm
This is great! Thank you all of you!  8) .I also made a quick aplication but it isnt very advanced.Only says if its on or not.You can try it out bellow is link ;)

DOWNLOAD ME (http://ompldr.org/iNnVpMA)


wow ;p I can do this with lower requirement (gui takes space too!):
Code: [Select]
cmd
ping fonline2238.net
echo Yea, I'm boss
save as status.bat and then run it ;p
Title: Re: FOnline SDK - Question
Post by: Kamilos93 on January 05, 2011, 05:46:54 pm
Code: [Select]
[00:073] FOnline server, version 0396-A1.
[01:039] ***   Starting initialization   ****
[01:042] Script system initialization...
[01:055] Reload scripts...
[01:953] Reload scripts complete.
[01:953] Bind reserved functions...
[01:969] Bind reserved functions complete.
[01:969] Script system initialization complete.
[01:969] Loading language packs...
[02:032] Loading language packs complete, loaded<2> packs.
[02:032] Reload client scripts...
[02:156] Reload client scripts complete.
[02:156] Indexing client data.
[02:158] Indexing complete, clients found<15>.
[02:159] AI manager initialization...
[02:159] Find bags...
[02:185] Loaded<154> bags.
[02:185] AI manager initialization complete.
[02:185] Item manager initialization...
[02:186] Item manager initialization complete.
[02:186] Critter manager initialization...
[02:201] Critter manager initialization complete.
[02:201] Map manager initialization...
[02:203] Map manager initialization complete.
[02:203] Var Manager initialization.
[02:203] Update template vars...
[02:426] Update template vars complete.
[02:426] Var Manager initialization complete.
[02:426] Load Dialogs...[02:426] from list<dialogs.lst>.
[02:911] Loading dialogs finish, loaded<799/799>.
[02:992] FixBoy load crafts...
[02:992] FixBoy load crafts complete.
[02:997] Loaded<137> critter types.
[03:004] Refresh GM Mask<wm.msk>...[03:014] size<1400><1500>. complete.
[03:014] Loading items prototypes...
[03:154] Items prototypes successfully loaded, count<4608>.
[03:154] Loading critters prototypes...
[03:191] Loaded<515> critter protos, errors<0>.
[03:191] Load maps prototypes...
[03:484] Script::Bind - Function<bool s_Dialog(Critter&,Scenery&,int,Item@)> in module<scenery> not found, result<-6>.
[03:484] ProtoMap::BindSceneryScript - Map<pid<504>, name<farm1>>, Can't bind scenery function<s_Dialog> in module<scenery>. Scenery hexX<157>, hexY<122>.
[03:484] Script::Bind - Function<bool s_Dialog(Critter&,Scenery&,int,Item@)> in module<scenery> not found, result<-6>.
[03:484] ProtoMap::BindSceneryScript - Map<pid<504>, name<farm1>>, Can't bind scenery function<s_Dialog> in module<scenery>. Scenery hexX<82>, hexY<86>.
[03:484] Script::Bind - Function<void t_NpcMessageShout(Critter&,Scenery&,bool,uint8,int)> in module<trigger> not found, result<-6>.
[03:484] ProtoMap::BindSceneryScript - Map<pid<504>, name<farm1>>, Can't bind scenery function<t_NpcMessageShout> in module<trigger>. Scenery hexX<81>, hexY<115>.
[03:484] Script::Bind - Function<void t_NpcMessageShout(Critter&,Scenery&,bool,uint8,int)> in module<trigger> not found, result<-6>.
[03:484] ProtoMap::BindSceneryScript - Map<pid<504>, name<farm1>>, Can't bind scenery function<t_NpcMessageShout> in module<trigger>. Scenery hexX<82>, hexY<115>.
[03:484] Script::Bind - Function<void t_NpcMessageShout(Critter&,Scenery&,bool,uint8,int)> in module<trigger> not found, result<-6>.
[03:484] ProtoMap::BindSceneryScript - Map<pid<504>, name<farm1>>, Can't bind scenery function<t_NpcMessageShout> in module<trigger>. Scenery hexX<82>, hexY<114>.
[03:506] Load maps prototypes complete, loaded<271> protos.
[03:507] Load locations prototypes...
[03:510] MapManager::LoadLocationProto - Proto map is not loaded, location pid<127>, name<e_mountain7>.
[03:510] Load location<127> fail.

I need help in last update I can't run my server :/
Title: Re: FOnline SDK - Question
Post by: raynor009 on January 05, 2011, 07:10:07 pm
What revision number is that? Looks like the server failed to load a map.Did you try searching if you have the map or to control if its there?
Title: Re: FOnline SDK - Question
Post by: barter1113 on January 05, 2011, 08:21:59 pm
Delete
Code: [Select]
e_mountain7 map from locations.cfg

I have a question. How can I make quest? I know how to do easy dialogs but I don't know how works quests.
Title: Re: FOnline SDK - Question
Post by: barter1113 on January 06, 2011, 10:16:14 am
Up, how can I make easy quest like bring me x items?
Title: Re: FOnline SDK - Question
Post by: raynor009 on January 06, 2011, 10:28:10 am
Open a dialog file with the Dialog Editor look at a quest dialog and see how its made.Make your dialog with another npc and replace the PID code
Title: Re: FOnline SDK - Question
Post by: barter1113 on January 07, 2011, 11:01:02 am
Open a dialog file with the Dialog Editor look at a quest dialog and see how its made.Make your dialog with another npc and replace the PID code

What dialog exaple because I can't find anything.
Title: Re: FOnline SDK - Question
Post by: raynor009 on January 07, 2011, 11:43:54 am
Server/text/engl or russian FOQUEST
Title: Re: FOnline SDK - Question
Post by: Mayck on January 20, 2011, 02:02:00 pm
Hi, how can I get value of Access Level of CritterCl?
GetAccess() function does not work.
Title: Re: FOnline SDK - Question
Post by: Wipe on January 20, 2011, 02:27:35 pm
Hi, how can I get value of Access Level of CritterCl?
GetAccess() function does not work.

GetAccess() is member of Critter, not CritterCl.
Title: Re: FOnline SDK - Question
Post by: Mayck on January 20, 2011, 03:20:39 pm
GetAccess() is member of Critter, not CritterCl.
I thought that CritterCL inherits from Critter... my bad. Thanks.
Title: Re: FOnline SDK - Question
Post by: Jimmy BoyX on January 20, 2011, 06:40:33 pm
Where can I get mods, maps, graphics, tutorials, programs and other informations for SDK? Anyone know good tutorials how to modding?
Title: Re: FOnline SDK - Question
Post by: Lexx on January 20, 2011, 08:26:08 pm
Check out the official english and russian dev board (http://www.fonline.ru/forum/forumdisplay.php?f=88).
Title: Re: FOnline SDK - Question
Post by: FstrAnthony on April 14, 2011, 07:42:23 pm
what is this fallout SDK u are talking about im wondering what it is
Title: Re: FOnline SDK - Question
Post by: SIGISMUND on April 14, 2011, 10:09:52 pm
what is this fallout SDK u are talking about im wondering what it is

First learn russian cuz google is shit.
Title: Re: FOnline SDK - Question
Post by: FstrAnthony on April 15, 2011, 06:39:37 pm
what is it i just want to no what it is
Title: Re: FOnline SDK - Question
Post by: Lexx on April 15, 2011, 06:48:33 pm
With the FOnline SDK you can run your own FOnline (TLA) server and create your own game (singleplayer / multiplayer). You could have found that out  on your own with using google for a few minutes or just reading this thread.
Title: Re: FOnline SDK - Question
Post by: FstrAnthony on April 20, 2011, 07:25:49 pm
thats sounds amazing but it i suppose it is still in beta like fonline i take
Title: Re: FOnline SDK - Question
Post by: SIGISMUND on April 20, 2011, 08:59:49 pm
Whit all the rif raf on the forum about the sdk you must be either blind or dumb not to notice it.
Title: Re: FOnline SDK - Question
Post by: Jireh on April 23, 2011, 11:44:55 pm
Could you get fallout 2238 to singleplayer, as you could do in this FOnline TLA thingy (see, im showing ignorance so you will be willing to help me more)
Title: Re: FOnline SDK - Question
Post by: RavenousRat on April 23, 2011, 11:50:43 pm
Could you get fallout 2238 to singleplayer, as you could do in this FOnline TLA thingy (see, im showing ignorance so you will be willing to help me more)
Of couse! Just ask devs to give you all thier server files, scripts, dialogues, maps, etc.! Unfortunately there's even more than 95% that they will decline you.
Title: Re: FOnline SDK - Question
Post by: FstrAnthony on April 24, 2011, 10:27:12 pm
Is the client as big as regular fonline and i was bored this is my first time acknwledgeing this topic
Title: Re: FOnline SDK - Question
Post by: BlindMaster on May 20, 2011, 01:39:14 pm
I made myself a server and can't kill annything in it WHy?


OOO and how do i give myself a skin?
Title: Re: FOnline SDK - Question
Post by: Xarr on May 20, 2011, 04:27:45 pm
I made myself a server and can't kill annything in it WHy?
That is a heavy problem i know. example if you attack NPC's you can due 99999999999999 damage but they still have full hp.
(as far i remember) i sloved my problem with an complete update of the SDK
OOO and how do i give myself a skin?
ni
Title: Re: FOnline SDK - Question
Post by: BlindMaster on May 20, 2011, 04:49:52 pm
Quote from: BlindMaster on Today at 12:39:14 pm
OOO and how do i give myself a skin?
ni


What about it?
Title: Re: FOnline SDK - Question
Post by: Xarr on May 20, 2011, 05:38:39 pm
my fault, many FOnliner do not know...  ::)
Ni (http://www.fo2238.fodev.net/wiki/No_Idea)
I like saying it, coz Rusty 's Awsomenes in person xD
Title: Re: FOnline SDK - Question
Post by: BlindMaster on May 20, 2011, 08:17:05 pm
How do i addd Npc where i want whitout using the editor???
How do i know what hex is he going to appear???
Title: Re: FOnline SDK - Question
Post by: Mayck on May 20, 2011, 08:35:21 pm
and how do i give myself a skin?
~runscript debug body <critterId> <skinId> 0

How do i addd Npc where i want whitout using the editor???
~addnpc <x> <y> <direction> <npcProtoId>

How do i know what hex is he going to appear???
Either you can experiment with ~move command to figure out right coordinates or you can try to write a simple script for that. (maybe there's some other way, I'm not sure about that)
Title: Re: FOnline SDK - Question
Post by: Xarr on May 20, 2011, 10:22:53 pm
Either you can experiment with ~move command to figure out right coordinates or you can try to write a simple script for that. (maybe there's some other way, I'm not sure about that)
~gameinfo 1
You will see some informations, a bit down and left in the message you see the X and Y of the actual listed Player. So you want (example) a NCP near you you type ~addnpc (X-1) (Y) (ID) (ID) and you have (ID) next to you.
Title: Re: FOnline SDK - Question
Post by: Mayck on May 20, 2011, 11:27:55 pm
or you can try this (simple script editing):
Code: [Select]
if(message=="~xy")
{
uint16 hexX=0, hexY=0;
GetMonitorHex(__MouseX, __MouseY, hexX, hexY);
Message("Hex: "+hexX+" "+hexY);
return false;
}
If you add it into client_main.fos right behind the if(message[0]=="~names"){...<somelines>...} block.
Then everytime you type ~xy you will get X Y coordinates of your mouse. (There are more elegant ways to deal with it, but this is one of the simpliest)
Title: Re: FOnline SDK - Question
Post by: Xarr on May 21, 2011, 01:15:08 am
Code: [Select]
if(message=="~xy")
{
uint16 hexX=0, hexY=0;
GetMonitorHex(MouseX, MouseY, hexX, hexY);
Message("Hex: "+hexX+" "+hexY);
return false;
}
are you sure that you mean
Code: [Select]
Message("Hex: "+hexX+" "+hexY);
? (because the " )
Title: Re: FOnline SDK - Question
Post by: Mayck on May 21, 2011, 01:27:00 am
Damn i forgot something , there should be __MouseX instead of MouseX(edited the previous post)

are you sure that you mean
Code: [Select]
Message("Hex: "+hexX+" "+hexY);
? (because the " )
Don't know what's wrong with that line (looks fine to me)

Edit: if you use + between string and number variable the number gets automatically converted to string so it's practically same like if i wrote Message("Hex: 666 13");
Title: Re: FOnline SDK - Question
Post by: Wipe on May 21, 2011, 01:57:19 am
Much better - imho - is to use DrawText() (http://img818.imageshack.us/img818/1137/screen21052011015244.jpg) inside main loop; this way you can display much more info without typing command every minute.
Title: Re: FOnline SDK - Question
Post by: Xarr on May 21, 2011, 02:09:19 am
Don't know what's wrong with that line (looks fine to me)
then i looked wrong, shit happens
Title: Re: FOnline SDK - Question
Post by: Mayck on May 21, 2011, 02:11:22 am
Much better - imho - is to use DrawText() (http://img818.imageshack.us/img818/1137/screen21052011015244.jpg) inside main loop; this way you can display much more info without typing command every minute.
Indeed.
Strange, i never thought about using it for coordinates (I guess i got used too much to console typing ;D ), though I already use it for capturing countdowns and similiar things  :)
Title: Re: FOnline SDK - Question
Post by: BlindMaster on May 21, 2011, 06:20:45 am
Where can i get that draw text??
Title: Re: FOnline SDK - Question
Post by: Mayck on May 21, 2011, 11:43:39 am
Where can i get that draw text??

In client_main.fos
edit render_iface function so it looks like this
Code: [Select]
... code ...
void render_iface(uint layer)
{
if(layer == 3)
{
//next 3 lines were added
uint16 hexX=0, hexY=0;
GetMonitorHex(__MouseX, __MouseY, hexX, hexY);
DrawText("Hex: "+hexX+" "+hexY,__ScreenWidth-100,20, 100, 20, 0, FONT_FALLOUT, FT_CENTERR);

DrawChosenTabs();
... code ...
that should do the trick
Title: Re: FOnline SDK - Question
Post by: barter1113 on May 22, 2011, 06:58:42 pm
How all script should look? Can someone put here drawtext?
Title: Re: FOnline SDK - Question
Post by: Surf on May 22, 2011, 07:01:17 pm
Mayck posted everything you need already.  ::)
Title: Re: FOnline SDK - Question
Post by: BlindMaster on May 28, 2011, 07:52:44 am
How can i add slavery back in TLA?

edit: After i did what Mayec sayed i can't see my inv or annything like this.Can you give me a copy from your client main?
Title: Re: FOnline SDK - Question
Post by: Mayck on May 28, 2011, 11:05:37 am
How can i add slavery back in TLA?
If i remember correctly, it was never there, so you can't simply add it back. Unless you script it...

edit: After i did what Mayec sayed i can't see my inv or annything like this.Can you give me a copy from your client main?
You didn't delete this line, did you?
GUI_Render();
Title: Re: FOnline SDK - Question
Post by: BlindMaster on May 28, 2011, 11:57:01 am
How to place armed NPC?
Title: Re: FOnline SDK - Question
Post by: Surf on May 28, 2011, 12:41:03 pm
Place NPC in mapper on the spot where you want them, give them bags, or add manually weapons to their inventory. Alt click to give stuff to them, shift click on weapon to arm them with weapon.
Title: Re: FOnline SDK - Question
Post by: BlindMaster on May 28, 2011, 01:31:56 pm
Alt click to give stuff to them, shift click on weapon to arm them with weapon.
Nothing Happens! Just start talking to them

And yes!I am loged
Title: Re: FOnline SDK - Question
Post by: Crazy on May 28, 2011, 02:08:30 pm
Nothing Happens! Just start talking to them

And yes!I am loged

In the mapper...
Title: Re: FOnline SDK - Question
Post by: BlindMaster on May 28, 2011, 02:47:54 pm
how to add my location to map?
Title: Re: FOnline SDK - Question
Post by: jan0s1k on May 28, 2011, 11:40:55 pm
Question maybe to Mayck, maybe to FO2238 scripters:
How could I get something only for moder/admin access?
I tried for example:
Code: [Select]
void render_iface(uint layer)
{
if(layer == 3)
{
CritterCl@ chosen = GetChosen();
if(chosen.GetAccess()==ACCESS_ADMIN){
uint16 hexX=0, hexY=0;
GetMonitorHex(__MouseX, __MouseY, hexX, hexY);
DrawText("Hex: "+hexX+" "+hexY,__ScreenWidth-100,20, 100, 20, 0, FONT_FALLOUT, FT_CENTERR);
}

DrawChosenTabs();
GUI_Render();
}

But it seems, that it doesn't work (shouting something about not existing CritterCL.GetAccess function or something..)
Title: Re: FOnline SDK - Question
Post by: Mayck on May 29, 2011, 12:01:15 am
GetAccess works only for Critter not CritterCl, because Critter and CritterCL are two different classes (they do not inherit anything between themselfs, though they might look similiar.)

I am using some unused parameter to get the access level client-side.
Title: Re: FOnline SDK - Question
Post by: BlindMaster on May 29, 2011, 10:38:54 am
If i remember correctly, it was never there, so you can't simply add it back. Unless you script it...

OK.THen how to make an NPC fallow me and fight with me??
Title: Re: FOnline SDK - Question
Post by: Surf on May 29, 2011, 10:42:34 am
OK.THen how to make an NPC fallow me and fight with me??


http://fodev.net/forum/index.php?topic=15466.0
Title: Re: FOnline SDK - Question
Post by: Nick.is.Back on June 15, 2011, 11:47:29 am
How to set ai to NPC?

OR make me able to kill anny npc in town(i am hitting an NPC for 99999999 damange and he is unhurt)

and why my alt+click dosn't work for what surf say?
Title: Re: FOnline SDK - Question
Post by: Mayck on June 15, 2011, 12:17:33 pm
Go to Redding npcs there are mortal  ;D
Title: Re: FOnline SDK - Question
Post by: Gob on June 15, 2011, 02:48:21 pm
If I understand ok you want to disable PvP maps.If that so go to server/scripts/config.fos open it and where it says   __NoPvpMaps                 = true; change to __NoPvpMaps                 = false;

And forgot to mention that you gotta reload map so that NPC's you spawn get the AI to work.
Title: Re: FOnline SDK - Question
Post by: barter1113 on July 16, 2011, 09:08:06 pm
How to add new locations? Now, there are few changes into locations.cfg and I don't know how to add new places. Could you help me? I use 229 revision.
Code: [Select]
[Area 17]
name            = Primal Tribe
size            = 6
map_0           = primal_tribe* 70
entrance        = 1
visible         = 1
auto_garbage    = 0
What is "70"?
Title: Re: FOnline SDK - Question
Post by: Lexx on July 18, 2011, 11:14:35 am
70 is the map id. Most likely for primal_tribe.
Title: Re: FOnline SDK - Question
Post by: corosive on August 01, 2011, 03:23:04 am
I've got three good starting questions:

1. How do you change travel speed?
2. How do you change the starting location/ alter the starting quest
3. How do you change the encounter rate?
Title: Re: FOnline SDK - Question
Post by: Kilgore on August 01, 2011, 01:32:06 pm
1. /server/scripts/_define.fos -> #define GLOBAL_MAP_BASE_SPEED
2. /server/scripts/q_main_intro.fos
3. /server/scripts/config.fos -> __EncounterTime
Title: Re: FOnline SDK - Question
Post by: corosive on August 03, 2011, 11:32:00 pm
sweet, we should try to get as many q/a's as possible in this thread
Title: Re: FOnline SDK - Question
Post by: corosive on August 04, 2011, 07:33:25 am
Here is a very sloppy compilation of things I've found online. It's pretty straightforward just look closely and you should be able to figure things out.

Instead of reading this entire thread to find answers you just really need to read this, it's pretty much just random copy and pasted forum posts, enjoy.

------

Files related to Quest creation:

•\scripts\_vars.fos –- variables
•\scripts\_dialogs.fos – - dialogues that are involved in the scripts
•\scripts\_maps.fos – - cards that are involved in the scripts
•\text\[language]\FOQUEST.MSG –  - to describe the quests in the Pip-Boy
•\dialogs\ – - here to keep the dialogue for the characters
•\dialogs\dialogs.lst – - here these conversations to prescribe
•\scripts\ - - is to keep scripts for quests, if any,
•\scripts\scripts.cfg – - here they prescribe, if necessary

--------

Random useful commands

~param 0 72 xxx - Heal yourself

~additemself 349 1 - First vallue is the code of the item and the second is the number.You can find more item codes in

Server/data/ItemsNames.ist open it with Notepad++ in front of each item is the code.

SPECIAL:
~param 0 [0-6] x - change your SPECIAL stats, ~param 0 0 10 - 10 ST

SKILLS:
~param 0 [200-217] % - change your skills, ~param 0 200 100 - 100% SG

PERKS:
~param 0 [300-439] x - add perks, x is number of perks, ~param 0 322 1 - 1x better criticals

OTHER STATS:
~param 0 [number] x

You can find all param commands in SDK/Server/Scripts/_defines

OTHER COMMANDS:
~drop - you can log other account without 10 minutes relog
~regenmap - regeneration map
~toglobal - teleport to world map
~respawn ID - respawn, your ID is 0
~regenmap - regeneration map
~addnpc hx hy dir pid - add npc
~addloc coords pid - add location on world map
(...)

All commands are SDK/Docs/FOnlineRu

~run debug tele 0 [location pid] [map index]

~run debug ToMapEntire [map pid] [entire] 0

~runscript debug body <critterId> <skinId> 0 //Add different char skin

~addnpc <x> <y> <direction> <npcProtoId>

------------

How to easily find coordinates and example of how to make a command


if(message=="~xy")
{   

   uint16 hexX=0, hexY=0;   
   GetMonitorHex(__MouseX, __MouseY, hexX, hexY);   
   Message("Hex: "+hexX+" "+hexY);   return false;

}

If you add it into client_main.fos right behind the if(message[0]=="~names"){...<somelines>...} block.
Then everytime you type ~xy you will get X Y coordinates of your mouse. (There are more elegant ways to deal with it, but

this is one of the simpliest)

--



1. How do you change travel speed?
2. How do you change the starting location/ alter the starting quest
3. How do you change the encounter rate?

1. /server/scripts/_define.fos -> #define GLOBAL_MAP_BASE_SPEED
2. /server/scripts/q_main_intro.fos
3. /server/scripts/config.fos -> __EncounterTime


------

World Map

You have to put the fallout map in the "maps" folder located within the map called "server".
Then edit the CFG file "locations" in the "maps" folder and provide the information and ID you want your
map to have.
If you want to generate it on the world map you have to edit the file "GenerateWorld" with the right information.

Remember to delete all the saves in the "save" folder before you do it.
Restart the server and it should work.


Example how the location information could look like:

[Area 500] // "ID" of the map
name = Cola's location // location name
size = 24 // size of the map
map_0 = Cola's location* 500 // the first location (you can add more locations)
visible         = 1 //visible or not.
auto_garbage    = 0 // I have no idea, just add it.


Example how the GenerateWorld could look like:
@ 500 975 1020 # Cola's location // ID X Y # Name of the map

Your map should be generated at the XY - 975 1020
You can go to your location directly by using the command:
~runscript debug testmap 0 500 0

(You have to give your self admin first // ~getadmin admin [password provided in FOnlineServer CFG file])

-----

Replication time // Switch "Minute" with "Second" to switch to seconds

{
      if(cr.IsPlayer()) replTime=3; // 3 minutes
      else replTime=Random(1,1); // 90-120 minutes
   }

-----------

Bounty Hunters

void CallTownSupply(Critter& victim, Critter& hostile) // Export
{
   if(IsValidForSupply(victim,hostile))
   {
      return;  // To disable bounty hunters
     
      uint[] values={victim.Id,hostile.Id,0};
      ::CreateTimeEvent(__FullSecond+SUPPLY_TIME,"e_CallTownSupply",values,true);
   }


--------

Commands

Command List
1. exit
Access Level: any.
Exit the game.

2. myinfo
Access Level: any.
Displays some information about the current character - ID, name, password, access level.

3. gameinfo <type>
Access Level: moderator.
Request for displaying information about the game, where the type of information requested (type) may be as follows:

0) statistics of use of memory;
1) a summary of current players in the game;
2) statistics locations and maps;
3) the current time event;
4) the current state of data AnyData;
5) statistics of the items in the game;

4. id <name>
Access Level: moderator.
Request ID Critter with (name).
Note: not implemented yet

5. move <id> <hx> <hy>
Access Level: moderator.
Move character with (id) at a certain hex (hx, hy).

6. kill <id>
Access Level: moderator.
Kill character with (id).

7. disconnect <id>
Access Level: moderator.
Disconnects character with (id) from the server.

8. toglobal
Access Level: tester.
Exit the current character on the global map.

9. respawn <id>
Access Level: moderator.
Resurrect the character with (id). If id is 0, then resurrect the current character.

10. param <type> <num> <value>
Access Level: tester.
Change properties/parameters of the current character.
type must be zero
num is parameter number (see Server\data\ParamNames.lst)
value is the new value

11. getaccess <access name> <access password>
Access Level: any.
Change access level.
access name - the name of access (client, tester, moder, admin).
access password - password (password are defined in FOnlineServer.cfg on rows

Code:
# Avaiable four access mode: client (default on login), tester, moder, admin
Access_client=000000 00000000
Access_tester=
Access_moder=aaa
Access_admin=blabla


12. crash
Access Level: implementor.
Crashes the server application.
Note: not implemented / obsolete

13. additem <hx> <hy> <pid> <count>
Access Level: moderator.
Add item (pid, count) for a certain hex (hx, hy).
For the list of items use either object editor from Tools directory or see Server\proto\items\

14. additemself, ais <pid> <count>
Access Level: moderator.
Add item (pid, count) in inventory.

15. addnpc <hx> <hy> <dir> <pid>
Access Level: moderator.
Add SPC (pid, dir) for a certain hex (hx, hy).
For the list of NPCs see Server\proto\critters\

16. addloc <wx> <wy> <pid>
Access Level: moderator.
Add location (pid) in a certain point (wx, wy) on the global map.

17. reloadscripts
Access Level: Administrator.
Reloads all server scripts.

18. loadscript, load <script name>
Access Level: Administrator.
Tries to reload script in the same way how it is done when server starts.

19. reloadclientscripts, rcs
Access Level: Administrator.
Restart the client scripts.

20. runscript, run <module name> <func name> <param0> <param1> <param2>
Access Level: Administrator.
Run function (module name, func name), with given parameters (param0, param1, param2).

21. reloadlocations
Access Level: Administrator.
Reload this prototype locations.

22. loadlocation <pid>
Access Level: Administrator.
Download some prototype (pid) location.

23. reloadmaps
Access Level: Administrator.
Reload this prototype cards.

24. loadmap <pid>
Access Level: Administrator.
Download some prototype (pid) card.

25. regenmap
Access Level: Administrator.
Regenerate the map on which the current is character.

26. reloaddialogs
Access Level: Administrator.
Reload all dialogs.

27. loaddialog <dialog name> <dialog id>
Access Level: Administrator.
Download some dialogue (dialog name), under a certain ID (dialog id).

28. reloadtexts
Access Level: Administrator.
Reload all MSG files.

29. reloadai
Access Level: Administrator.
Reload bags SPC (Bags.cfg).

30. checkvar, cvar <tid var> <master is npc> <master id> <slave id> <full_info>
Access Level: moderator.
Check the status of a specific game variable.
tid var - the variable number;
master is npc - whether the master id of the NPC, 0 - no, the rest - yes. If yes, then to master id is automatically added

5kk, because Indexing NPC begins with this number;
master id - the primary identifier;
slave id - a secondary identifier;
full_info - Whether or not complete information on the variable, 0 - no, the rest - yes.

31. setvar, svar <tid var> <master is npc> <master id> <slave id> <value>
Access Level: moderator.
Check the status of a specific game variable.
tid var - the variable number;
master is npc - whether the master id of the NPC, 0 - no, the rest - yes. If yes, then to master id is automatically added

5kk, because Indexing NPC begins with this number;
master id - the primary identifier;
slave id - a secondary identifier;
value - the new value.

32. settime <tmul> <year> <month> <day> <hour> <minute> <second>
Access Level: Administrator.
Change the game time.
tmul - acceleration time 0 - no change;
year - the year 0 - no change;
month - month, 0 - no change;
day - day 0 - no change;
hour - hour;
minute - a minute;
second - second;

33. ban <add,add ,delete,list> <user> <hours> <comment>
Access Level: moderator.
Ban a specific player.
add - add a ban character;
add - add a ban of the character and IP address;
delete - delete from the list of banned;
list - display a list of banned;
user - name of the character;
hours - the time of suspension, in hours;
comment - a comment, you can not write.

34. deleteself <password>
Access Level: any.
Delete the current character.

35. changepassword, changepass <password> <new password>
Access Level: any.
Change the password for the current character.

36. dropuid, drop
Access Level: tester.
Reset antialt timer for current character.

-----

Title: Re: FOnline SDK - Question
Post by: corosive on August 05, 2011, 08:29:28 am
How do you customize random encounters? Lets say I only want to encounter Ghouls and Ghouls VS X, how do you do that?
Title: Re: FOnline SDK - Question
Post by: Gob on August 06, 2011, 10:17:34 am
How do you customize random encounters? Lets say I only want to encounter Ghouls and Ghouls VS X, how do you do that?

Is not my duty to tell you but tripple post ain't allowed neither double and tripe is already overkill :) . you should use the modify button.And there was already and answer to that question here use the search button.
Title: Re: FOnline SDK - Question
Post by: runboy93 on August 06, 2011, 12:33:21 pm
Hmm.. i got problem with server.

When i start to play with client i only see blackscreen without those "log in, register.." things.
I have started server.exe, but it don't work.
Title: Re: FOnline SDK - Question
Post by: Gob on August 06, 2011, 10:06:05 pm
Hmm.. i got problem with server.

When i start to play with client i only see blackscreen without those "log in, register.." things.
I have started server.exe, but it don't work.

runboy93 If you check my tutorials you will get the answer there.

http://fodev.net/forum/index.php?topic=12198.0
Title: Re: FOnline SDK - Question
Post by: barter1113 on August 07, 2011, 12:26:48 pm
I get error message when I put focd 1.15d into client sdk. How to fix it? Sdk version is 232. (http://img577.imageshack.us/img577/5066/bugaw.th.png) (http://imageshack.us/photo/my-images/577/bugaw.png/)

Uploaded with ImageShack.us (http://imageshack.us)
Title: Re: FOnline SDK - Question
Post by: jan0s1k on August 07, 2011, 02:34:23 pm
I get error message when I put focd 1.15d into client sdk. How to fix it? Sdk version is 232. (http://img577.imageshack.us/img577/5066/bugaw.th.png) (http://imageshack.us/photo/my-images/577/bugaw.png/)

Uploaded with ImageShack.us (http://imageshack.us)

After this (http://xp-dev.com/sc/change/94227/91) revision you won't be able to use FOCD
But yes, you can download revision 90 and be happy from working FOCD which you could implement easier or harder in newer revisions  ::)
Title: Re: FOnline SDK - Question
Post by: barter1113 on August 07, 2011, 06:35:11 pm
Code: [Select]
[22:805] Loading language packs...
[22:824] FOMsg::LoadMsgFileBuf - Error string id, cur<3707001>, last<3707102>
[22:824] LanguagePack::LoadAll - Unable to load MSG<FOQUEST.MSG>.
[22:827] Unable to init Language pack<0>.
[22:828] Initialization fail!
New, clean sdk revision and I can't launch server!
Title: Re: FOnline SDK - Question
Post by: corosive on August 07, 2011, 09:23:12 pm
You can fix the starting black screen error by running Zippatch.bat, afterwards you'll end up with fonline.zip, extract that into your client\data folder, overwriting the older files. Problem solved.
Title: Re: FOnline SDK - Question
Post by: barter1113 on August 08, 2011, 12:51:53 pm
You can fix the starting black screen error by running Zippatch.bat, afterwards you'll end up with fonline.zip, extract that into your client\data folder, overwriting the older files. Problem solved.
It is working for focd 1.15d?
Title: Re: FOnline SDK - Question
Post by: Xarr on August 08, 2011, 10:34:46 pm
How to add Own-drawn Critters?
Title: Re: FOnline SDK - Question
Post by: runboy93 on August 08, 2011, 11:05:05 pm
You can fix the starting black screen error by running Zippatch.bat, afterwards you'll end up with fonline.zip, extract that into your client\data folder, overwriting the older files. Problem solved.
Yeah i got it working now :)
Title: Re: FOnline SDK - Question
Post by: corosive on August 09, 2011, 08:33:26 am
How do you add a location to the worldmap? I've been trying it...
Here is what I've done so far:

Map name: i_farm

Added info to "Locations.cgf"

[Area 666]
name          = A small Farm
size            = 6
map_0         = i_farm 666
visible         = 1

Placed it on the worldmap "Generateworld.cgf"

@  46   375   500 # A small Farm

Added the defines info to "_maps.fos"

Line 39: #define LOCATION_i_farm                (46)
Line 448: #define MAP_i_farm                       (666)


After all this I'm still getting an error... why...I knew i forgot to put something somewhere but what am I missing?
Title: Re: FOnline SDK - Question
Post by: cubik2k on August 09, 2011, 09:12:04 am
Try this:

[Area 46]
name          = A small Farm
size            = 6
map_0         = i_farm 666
visible         = 1
Title: Re: FOnline SDK - Question
Post by: corosive on August 09, 2011, 10:05:50 am
Nah still didn't work... Looked through the fonline.ru forums too, still can't get mah map on the worldmap

Is it really that simple tho? Add a few lines to "Locations" and "Generateworld" and voila it's on the worldmap? Because if so then it's probably the map I made that isn't working... or I didnt make the map properly... it's just a basic e_desert4 with a few npcs added with dialog saved as i_farm
Title: Re: FOnline SDK - Question
Post by: Mayck on August 09, 2011, 12:25:38 pm
If I remember correctly... When you're adding the location via Generateworld, you have to wipe the server. If you don't want to wipe it you have to do it by the ~addloc command
Title: Re: FOnline SDK - Question
Post by: nekro on August 09, 2011, 05:49:08 pm
Hey programmers where to get world map for fonline and how to edit it for fallout style ? how to add into game with water blockers and mountains speed? how do you do new world map?
Title: Re: FOnline SDK - Question
Post by: nekro on August 12, 2011, 04:47:48 pm
Why anyone cant tell me how to simple edit images maps for worldmap style fallout ? sorry for my english.
Title: Re: FOnline SDK - Question
Post by: cubik2k on August 12, 2011, 11:06:11 pm
because, if you do not discover it yourself, it is not so simple as you think to describe you how to do it.
Look into Client files, search file default.ini and try to clue on yourself. Most of us works this way.

FRM files for worldmap are inlcuded in master.dat \data\art\intrface\
Title: Re: FOnline SDK - Question
Post by: nekro on August 13, 2011, 09:58:07 am
but i dont know what kind of map i must copy. Can i use psyhical map of usa or draw map by myfelf? can you do tutorial ?
Title: Re: FOnline SDK - Question
Post by: nekro on August 20, 2011, 01:54:55 pm
i have map as .png file 1709x740
How to do it? Can developers help me?

Quote
GmapTilesPic          = WRLDMP%02d.FRM      # Íŕçâŕíčĺ čçîáđŕćĺíčé ăëîáŕëüíîé ęŕđňű
GmapTilesX            = 4                   # Ęîëč÷ĺńňâî čçîáđŕćĺíčé â řčđčíó
GmapTilesY            = 5                   # Ęîëč÷ĺńňâî čçîáđŕćĺíčé â âűńîňó
Title: Re: FOnline SDK - Question
Post by: Xarr on August 22, 2011, 12:31:52 am
Convert that picture to a .frm and replace WRLDMP%02d.FRM with (Here's your Filename).FRM

Then drop your .frm inside (and name it, like Above).
Title: Re: FOnline SDK - Question
Post by: Surf on August 22, 2011, 12:41:34 am
The file doesn't need to be a .frm. A .png file works aswell. Nekro, don't forget to define the resolution of your file in the .ini , I think 1709x710 might be a bit too big.
Title: Re: FOnline SDK - Question
Post by: Xarr on August 22, 2011, 12:46:41 am
Ah, Didn't knew that. I learn every day.

Tell me Surf, is 'too big' a Problem that causes Server crash or just some Lags?
Title: Re: FOnline SDK - Question
Post by: nekro on August 22, 2011, 11:29:59 am
2100x3000 it is orginal fonline 2238 map (mask same) so my map is smaller.
Title: Re: FOnline SDK - Question
Post by: Rascal on August 27, 2011, 08:34:15 pm
problem with splash screens:

I want to add my new splash screens to my SDK, and also turn off all original splash screens.
I delete all old ss from client/data/art/splash folder and added new instead.
The result is that both old and new are shownd ingame.

How to make it work ? Also is there an option to put some parrametrs of resolution for displaying splashscreens ?
Title: Re: FOnline SDK - Question
Post by: Berko on August 28, 2011, 02:33:28 pm
Maybe splash from master.dat are still here
From SPLASH0.rix to SPLASH6.rix in art/splash
Don't know if you have other solution to override them with files that have the same name.

splashscreens look to be resize to fit the screen resolution, I think we can't displaying different splash for different resolution.
Title: Re: FOnline SDK - Question
Post by: corosive on September 15, 2011, 04:03:46 am
how do you teleport a player through dialog? ex. say yes to be moved to a specific map.
Title: Re: FOnline SDK - Question
Post by: Xarr on September 15, 2011, 01:51:24 pm
how do you teleport a player through dialog? ex. say yes to be moved to a specific map.
~runscript debug tele ID MAP 0
(I think...)
Title: Re: FOnline SDK - Question
Post by: bSunday on September 20, 2011, 02:05:35 pm
Hi!

Is there any tutorial about FOnline-based single player mods? I followed the instructions what I found on this forum, but I need some information about single player game-making. Anybody has any experiences?
Title: Re: FOnline SDK - Question
Post by: Surf on September 20, 2011, 02:09:53 pm
Hi!

Is there any tutorial about FOnline-based single player mods? I followed the instructions what I found on this forum, but I need some information about single player game-making. Anybody has any experiences?

What in particular do you need to know? It's actually not that much different from creating a multiplayer game. As far as I know there is next to nothing on informations on creating Singleplayergames, as not many people are doing that.
Title: Re: FOnline SDK - Question
Post by: bSunday on September 20, 2011, 02:30:06 pm
What in particular do you need to know? It's actually not that much different from creating a multiplayer game. As far as I know there is next to nothing on informations on creating Singleplayergames, as not many people are doing that.
I know it's a dumb question, but how about the server? The instructions begin with the settings of your new server. But I want to make an offline game.
Title: Re: FOnline SDK - Question
Post by: Lexx on September 20, 2011, 02:37:41 pm
You'll have to provide the server files with the client files. I am sure there was a tutorial about it somewhere, can't find it now, though. In any case, it should work if you simply copy&paste all server files into the client folder (maps, proto, etc. has to be in /data/) and then you'll run the FOnlineSingleplayer.exe to start it all.
Title: Re: FOnline SDK - Question
Post by: Surf on September 20, 2011, 02:57:04 pm
The singleplayer exe works just fine if you don't copy all the files into the client and leave it as it is. ;)
Title: Re: FOnline SDK - Question
Post by: bSunday on September 20, 2011, 05:40:24 pm
Thx guys, I started a new server, create an admin account, etc. and it works.
I tried to add a new map, but it said: Initialization fail! And it can't load my map. Why? I think the problem is with the locations.cfg because I don't know my map's size and I wrote there just 6. Where is the size?
Title: Re: FOnline SDK - Question
Post by: Lexx on September 20, 2011, 06:47:05 pm
I hope you've added an Entire = 0 object, which defines the spawn point.

If you are new to FOnline, you should read the tutorials for the mapper in any case.
Title: Re: FOnline SDK - Question
Post by: bSunday on September 21, 2011, 08:37:24 am
Thanks, I check it out.
Title: Re: FOnline SDK - Question
Post by: corosive on September 25, 2011, 10:06:12 pm
hey speaking of maps! i used the geck01 map added it to my server on the worldmap and it worked fine, blank city, added npcs with dialogs. added those dialogs to the dialog.fos and _dialog.w.e file and ya everything worked. after a while the new dialogs i added over the time stopped working, npcs would be on the new maps (even after i deleted the save files and logs and client files etc) but they would appear as "nothing out of the ordinary."ive tried everything i can to fix this problem from deleting any file i can think of, i even tried starting a new server and copying my maps dialogs text and etc folders into it to just have the same problem....

this ticks me off lol everything new i try to add doesnt work for some stupid reason... im sure its an obvious one but whyyyy!!!!
Title: Re: FOnline SDK - Question
Post by: Gob on October 02, 2011, 02:02:51 pm
I have some issues with maps. I try to modify the existing maps and I wanted to add some new scenery to Barter Ground. Worked all fine no problems. My issue is I try to add a NPC but when I go to barter ground he is not there why? I did save map and modify the NPC gave him a script,dialog etc.Any ideas why?
Title: Re: FOnline SDK - Question
Post by: barter1113 on October 02, 2011, 06:50:43 pm
I have some issues with maps. I try to modify the existing maps and I wanted to add some new scenery to Barter Ground. Worked all fine no problems. My issue is I try to add a NPC but when I go to barter ground he is not there why? I did save map and modify the NPC gave him a script,dialog etc.Any ideas why?
use ~regenmap
Title: Re: FOnline SDK - Question
Post by: Gob on October 02, 2011, 10:01:25 pm
use ~regenmap

This worked thanks ^^.
Title: Re: FOnline SDK - Question
Post by: Gob on October 22, 2011, 04:01:31 pm
I have trouble with SDK. The ~param command doesn't seem to work.

I try things like

~param 0 0
~param 0 200 300
~param 0 72

Things to edit abbilities and some other things and it does nothing...

Any idea why? How can I fix this?
Title: Re: FOnline SDK - Question
Post by: JovankaB on October 22, 2011, 04:29:23 pm
I have trouble with SDK. The ~param command doesn't seem to work.

I try things like

~param 0 0
~param 0 200 300
~param 0 72

Things to edit abbilities and some other things and it does nothing...

Any idea why? How can I fix this?

There is a bug in SDK. Param doesn't work with latest versions. You can replace it with custom function until they fix it:

Code: [Select]
#include "_defines.fos"
void param( Critter& cr, int, int index, int value ) {
if( index < 200 ) {
cr.StatBase[index] = value;
} else if( index >= 200 && index <= 217 ) {
cr.SkillBase[index] = value;
} else if( index >= 300 && index <= 469 ) {
cr.PerkBase[index] = value;
} else if( index >= 510 && index <= 549 ) {
cr.ModeBase[index] = value;
}
}


Thanks to Ghosthack for the fix :)

Here is another function you can find useful, put it in the same module:

Code: [Select]
void godmode( Critter& cr, int, int, int ) {

// Boost stats
for( int i = 0; i <= 6; i++) {
param( cr, 0, i, 10 );
}
param( cr, 0, ST_ACTION_POINTS, 100 );
param( cr, 0, ST_MELEE_DAMAGE, 100 );
param( cr, 0, ST_CARRY_WEIGHT, 1000000 );

// Boost skills
for( int i = 200; i <= 217; i++) {
param( cr, 0, i, 300 );
}

// Boost perks/modes
param( cr, 0, PE_AWARENESS, 1 );
param( cr, 0, PE_SILENT_RUNNING, 1 );
param( cr, 0, MODE_NO_STEAL, 1 );
param( cr, 0, MODE_UNLIMITED_AMMO, 1 );
param( cr, 0, MODE_NO_DROP, 1 );
param( cr, 0, MODE_NO_LOOSE_LIMBS, 1 );
param( cr, 0, MODE_INVULNERABLE, 1 );
param( cr, 0, MODE_NO_KNOCK, 1 );
param( cr, 0, MODE_NO_LOOT, 1 );
param( cr, 0, MODE_NO_PUSH, 1 );

cr.Say( SAY_NORM, "Godmode enabled" );
}

~run jovb godmode 0 0 0 and you will get "godmode" without typing 100 params.
You can extend it to give you favorite armor, weapon etc. :)
Title: Re: FOnline SDK - Question
Post by: Gob on October 22, 2011, 05:46:02 pm
Thank you much apreciated.

Do I need to compile?
Title: Re: FOnline SDK - Question
Post by: JovankaB on October 22, 2011, 07:48:29 pm
If you do it like I said server should compile new script automatically on server start, and actually you don't even have to restart server, you can use ~load command to load script module, for example ~load jovb if you saved the scripts in jovb.fos file. You need admin access level to do this.
Title: Re: FOnline SDK - Question
Post by: Gob on October 22, 2011, 08:11:36 pm
Ah, I already did it. Is there a way to make this script available to normal clients? Without accessing admin powers or tester ecc...
Title: Re: FOnline SDK - Question
Post by: JovankaB on October 22, 2011, 10:21:34 pm
It is possible but requires more scripting.
Maybe someone will post some custom commands mod, I don't have anything ready to copy/paste :'(
Title: Re: FOnline SDK - Question
Post by: Gob on October 23, 2011, 03:53:41 pm
How can I make the NPC's on my map respawn very fast after I kill them like under a minute or something like that.
Title: Re: FOnline SDK - Question
Post by: JovankaB on October 23, 2011, 05:25:46 pm
How can I make the NPC's on my map respawn very fast after I kill them like under a minute or something like that.


It will make all critters which do respawn, respawn in 30 seconds.

Or if you want it only in your map, you must set it in critter properties in Mapper, but Im not sure if you can make it less than minute this way (without touching scripts).
Title: Re: FOnline SDK - Question
Post by: Gob on October 23, 2011, 07:23:04 pm
Thank's this worked ^^
Title: Re: FOnline SDK - Question
Post by: Grey on February 08, 2012, 03:41:08 pm
Hi, im desperately looking for a way to set music to a map. (.ogg or .acm)

I have tried looking inside master.dat and i have seen there is a line in each map which define a track to play.

little example:
map_name=trololo
music=01 - No Fate No Fear.ogg

The result is nothing  :-\

Anyone can helpme?
Title: Re: FOnline SDK - Question
Post by: Surf on February 08, 2012, 03:42:23 pm
Look in the FOGM.MSG - there you can define tracks and soundeffects for a map. Just look at the examples there, it should tell you how it is done.
Title: Re: FOnline SDK - Question
Post by: Grey on February 08, 2012, 04:10:59 pm
Awesome! thank you. How can it be there?? is just the global map info. Anyway, im sure this will be helpful for many others :)
Title: Re: FOnline SDK - Question
Post by: Gob on February 12, 2012, 05:01:54 pm
How can I disable the opacity thingy for the roof? So people can't see through it.
Title: Re: FOnline SDK - Question
Post by: Surf on February 12, 2012, 05:13:54 pm
setting the RoofAlpha to 255 in the config.fos file should do the trick.

Code: [Select]
/// Client specific definitions
#ifdef __CLIENT
__RoofAlpha             = 255;
Title: Re: FOnline SDK - Question
Post by: Gob on February 12, 2012, 05:22:25 pm
Thank you. It worked.
Title: Re: FOnline SDK - Question
Post by: Gob on February 13, 2012, 06:06:45 pm
How can I resize the mapper window ? It's difficult to make maps with a 800 x 600 window.....
Title: Re: FOnline SDK - Question
Post by: Wipe on February 13, 2012, 07:04:20 pm
Mapper uses client configuration, so just change it via FOConfig or manually in FOnline.cfg
Title: Re: FOnline SDK - Question
Post by: Gob on February 14, 2012, 08:53:41 am
Mapper uses client configuration, so just change it via FOConfig or manually in FOnline.cfg


Yes, I noticed after I chage resolution to client. It's pretty dumb IMO.
Title: Re: FOnline SDK - Question
Post by: JovankaB on February 14, 2012, 08:58:56 am
Whole mapper is... let's just say, suboptimal :)

Feel free to create better mapping application ;)
Title: Re: FOnline SDK - Question
Post by: Wipe on February 14, 2012, 05:31:45 pm

Yes, I noticed after I chage resolution to client. It's pretty dumb IMO.

Well, not really. Mapper share pretty much code with client, like drawing functions, so fixes in there affect both applications. But hey, nothing stops you from using command line switches (another shared part :P) for different resolution in mapper; these are checked after reading values from config, so...

Code: (Mapper1024.bat) [Select]
Mapper.exe -ScreenWidth 1024 -ScreenHeight 768
Title: Re: FOnline SDK - Question
Post by: Gob on February 14, 2012, 07:31:45 pm
Feel free to create better mapping application ;)

I'm not such a good programmer.
Title: Re: FOnline SDK - Question
Post by: Wipe on February 19, 2012, 09:17:25 pm
I'm not such a good programmer.

Since FOnline maps are enforced to be in text format, it doesn't require to be a pr0 to read them. In fact, simple parser can be done (http://pastebin.com/xLXfeuh6) just for practice, without deep knowledge about chosen language. Displaying given object graphic isn't much of a problem too (many .frm loaders around, (including this one ;p) (http://pastebin.com/Y23LvwB3)), so all you has to do is stick to the current format.

Biggest challenges in creating new mapper would be - imho - creating more user-friendly GUI, probably sorting objects in right order (last one is wild guess, someone more experienced should correct me if needed - i didn't messed with .fomap files for more advanced stuff than reading them, so... :>) and make it working with scripts. First two can be done even now, last thing can wait until you/someone make at least half-usuable application. If stuff will be good enough, i guess it would be much easier to get support from cvet ;)

Due to compatibility reasons, i would recommend C++ here - should be easier for everyone if program find its way into standard SDK tools. (but if someone make it perl+gtk, i'll give my whole "+1" limit for given month ;p)
Title: Re: FOnline SDK - Question
Post by: Kilgore on February 19, 2012, 10:14:39 pm
I completely don't understand why one would give a shit about making "a new, better" mapper.. for teh lulz?

The mapper is a very convenient tool after you just get used to it, which should take time of making few maps. Also, at least basic knowledge about SDK is handy, but not necessary. The only thing that I imagine missing there is "Undo" but it seriously doesn't matter if you know what you're doing. Also, I've seen some solution for it somewhere scripted by someone, I would post a link but I don't have it and don't use it.

The real problem is that there is almost no tutorials for mapper or good how-to-make-a-map guides.
Title: Re: FOnline SDK - Question
Post by: Lexx on February 19, 2012, 10:21:32 pm
Quote
The mapper is a very convenient tool after you just get used to it,

You probably haven't used many mapping tools yet.
Title: Re: FOnline SDK - Question
Post by: Surf on February 19, 2012, 10:28:53 pm
To me the mapper works allright aswell, the only thing I am really missing is some "undo" function.

E: was so lazy and didn't read the full post of kilgore, he got it already pointed out. (http://www.falloutnow.de/forum/Smileys/retro/s000.gif)
Title: Re: FOnline SDK - Question
Post by: Kilgore on February 19, 2012, 10:48:28 pm
You probably haven't used many mapping tools yet.
The outcome of your work is the thing that counts, not the tools you use, my master.
Title: Re: FOnline SDK - Question
Post by: Lexx on February 20, 2012, 10:31:47 am
The outcome of your work is the thing that counts, not the tools you use, my master.

So that means yes, I'll guess, my minion.

Well, if you like to do a million useless clicks and stuff, go for it. I am using the thing since 4 or so years and it's one of the most basic and rough mapping tools I've touched since ever. Doesn't matter if you can work with it or not, when it comes to usability, the thing just sucks.
Title: Re: FOnline SDK - Question
Post by: JovankaB on February 20, 2012, 10:51:43 am
What counts in case of creative tools is the time you need to get shit done.

Mapper doesn't help here a little bit except maybe that it has crude copy/paste.
Title: Re: FOnline SDK - Question
Post by: Gob on February 20, 2012, 11:00:43 am
The real problem is that there is almost no tutorials for mapper or good how-to-make-a-map guides.

That's pretty much true and the current ones are outdated. But to be honest it's not so hard to use it took me about 1 hour or so to get the hang of it. I started easy by modifying the available maps. Maybe added some NPC's of my own or something. Easyer than that it can't be. I think the creator of mapper wanted for it to be much like the one Black Isle made for Fallout 2, you know to make it have that falloutish feeling of the good ol' times.
Title: Re: FOnline SDK - Question
Post by: JovankaB on February 20, 2012, 11:28:50 am
Falloutish feeling in editors?  ::)

I think the reason why original commercial game development teams often have crappy editors is because it may take more
time to make a good one than finish maps with what they have before game release.
Title: Re: FOnline SDK - Question
Post by: Lexx on February 20, 2012, 12:22:50 pm
The only reason why the mapper has a "falloutish feeling" is because I've edited the interface long time ago and made it resemble the BIS mapper a little bit (so I would get used to the switch over easier). Other than that, the two programs are quite different.
Title: Re: FOnline SDK - Question
Post by: Kilgore on February 20, 2012, 02:40:49 pm
So that means yes, I'll guess, my minion.
Sorry to disappoint you, mister, by your guess is wrong. I've got my own tools for mapper and it still doesn't have anything to rewriting the whole thing. Better to make maps than waste that time on reinventing the wheel.

Quote from: JovankaB
What counts in case of creative tools is the time you need to get shit done.
SDK mapper is quite time efficient if you got used to it.

Quote from: Lexx
Well, if you like to do a million useless clicks and stuff, go for it. I am using the thing since 4 or so years and it's one of the most basic and rough mapping tools I've touched since ever. Doesn't matter if you can work with it or not, when it comes to usability, the thing just sucks.
It sucks for you, it doesn't for me. Ever heard about opinions?

As always, I admire your vast knowledge on the subject and infinite experience.
Title: Re: FOnline SDK - Question
Post by: barter1113 on February 20, 2012, 04:18:38 pm
Mapper is fine as it is.

EOT.  :)
Title: Re: FOnline SDK - Question
Post by: Lexx on February 20, 2012, 07:17:55 pm
Quote
SDK mapper is quite time efficient if you got used to it.

If you use copy&paste. A lot. Besides, I never stated that the tool must be rewritten or something.
 
Quote
Ever heard about opinions?

No, please tell me everything about it.

Man, I almost forgot what a douche you are. Thanks for reminding me.
Title: Re: FOnline SDK - Question
Post by: Gob on February 21, 2012, 09:39:49 am
The only reason why the mapper has a "falloutish feeling" is because I've edited the interface long time ago and made it resemble the BIS mapper a little bit (so I would get used to the switch over easier). Other than that, the two programs are quite different.

Falloutish feeling in editors?  ::)

It was a joke  :P
Title: Re: FOnline SDK - Question
Post by: Gob on April 17, 2012, 03:30:41 pm
Ok, I'm in a bit of a dilema here. I don't understand how calculate the position of the buttons in the main menu. I'm trying to make an interface of my own for my client and I want the buttons to be in the top right corner and the login box in the middle. Can someone explain to me how it's done?
Title: Re: FOnline SDK - Question
Post by: JovankaB on April 17, 2012, 04:00:56 pm
Ok, I'm in a bit of a dilema here. I don't understand how calculate the position of the buttons in the main menu. I'm trying to make an interface of my own for my client and I want the buttons to be in the top right corner and the login box in the middle. Can someone explain to me how it's done?

Interface is defined in Client\data\art\intrface\default.ini

Unfortunately it is a bit tricky, there is no WYSIWYG tool for this, so you have to position elements by editing ini file.
And descriptions in the file are in Russian, as usually with FOnline.

To edit main menu, check out variables that start with "Log", they should be near the top of the file.

For example when you have something like this:
LogName                = 80  141 225 158
It's login box. First 2 numbers is (x,y) of top-left corner and 2 last numbers are (x,y) of bottom-right corner.
This is not graphics, it's only invisible object that you can click and type there. Graphics is one background image.
Title: Re: FOnline SDK - Question
Post by: Gob on April 17, 2012, 06:57:20 pm
Thanks for the help JovankaB  ;)
Title: Re: FOnline SDK - Question
Post by: Wipe on April 17, 2012, 07:14:34 pm
There's also attempt for english interface documentation - WIP as hell (http://fo2238.fodev.net/wiki/GUI), but it's still worth to link (in case some deadly bored modder check this thread :>)
Title: Re: FOnline SDK - Question
Post by: Luther Blissett on April 18, 2012, 06:08:22 pm
[...]In fact, simple parser can be done (http://pastebin.com/xLXfeuh6) just for practice, without deep knowledge about chosen language. Displaying given object graphic isn't much of a problem too (many .frm loaders around, (including this one ;p) (http://pastebin.com/Y23LvwB3)), so all you has to do is stick to the current format.

Slightly off topic, but your description makes this sound almost simple - is it feasible that someone could make some kind of really basic "model checker" thing? Something to put one of our 3D test models in a tiny scene, but with the engine lighting etc, next to a 2D comparison sprite, then with the ability to reload / refresh textures?

I imagine it's a little more complex than it sounds by this description - but if it really is a fairly easy little process, this would help a lot with testing the 3D stuff.

To be honest, even a "refresh texture" command in the main game would be a massive benefit.
Title: Re: FOnline SDK - Question
Post by: Sean on April 23, 2012, 11:41:46 am
i have a few questions on sdk.
1. How do i make npc's run in real time combat  .
2. how do i prevent roll back.
3.how do i make enemies i want hostile.
Title: Re: FOnline SDK - Question
Post by: JovankaB on April 23, 2012, 11:49:44 am
i have a few questions on sdk.
1. How do i make npc's run in real time combat  .
2. how do i prevent roll back.
3.how do i make enemies i want hostile.

2. You must stop server by clicking "Stop server" button. If you just close window it's pretty much equivalent of just crashing it and there is no warning >:(
Title: Re: FOnline SDK - Question
Post by: Sean on April 23, 2012, 12:51:13 pm
ok thanks thats 1/3
Title: Re: FOnline SDK - Question
Post by: Gob on April 23, 2012, 03:07:19 pm
Disable FOV.
Title: Re: FOnline SDK - Question
Post by: Gob on April 28, 2012, 12:08:16 pm
I want to add some new critters in my game. For example the Securitron from FN:V is there a way to turn it into a .frm ? Or how can I modify the existing ones like color their clothes change aspect? I've seen on Russian forum a very long time ago someone made the Mirelurk from F3 work in FOnline by making him a .frm.
Title: Re: FOnline SDK - Question
Post by: JovankaB on April 28, 2012, 02:25:48 pm
I want to add some new critters in my game. For example the Securitron from FN:V is there a way to turn it into a .frm ? Or how can I modify the existing ones like color their clothes change aspect? I've seen on Russian forum a very long time ago someone made the Mirelurk from F3 work in FOnline by making him a .frm.

There is no need to use frm, FOnline has a better format - fofrm.
It's a text file. See specification: http://fonline.ru/forum/showthread.php?t=3836
As usually with FOnline, it's in Russian. You can open some 2238 fofrm in text editor to see how it's done.

Render 3D model animation to separate frames with correct angle, save each frame as cropped PNG then link them in .fofrm. You can't forget about setting proper offsets in fofrm. In practice it's tiresome task and you must into 3D basics first. Maybe there is some tool that helps with it but I don't know.
Title: Re: FOnline SDK - Question
Post by: barter1113 on April 28, 2012, 05:12:34 pm
I want to do it too but how can I render stuff from nv?
I only know it must has 6 view for each animation and frames.
Title: Re: FOnline SDK - Question
Post by: JovankaB on April 28, 2012, 05:25:17 pm
google: editing fallout 3 meshes
Title: Re: FOnline SDK - Question
Post by: Gob on April 28, 2012, 09:27:33 pm
Seems a bit complicated... Is it the same for adding new scenery?
Title: Re: FOnline SDK - Question
Post by: barter1113 on April 28, 2012, 10:05:42 pm
Seems a bit complicated... Is it the same for adding new scenery?

No, adding scenery is easier than critter because it only need one render from iso view. Tomorrow I will download GECK and try do sth if I find some info.
Title: Re: FOnline SDK - Question
Post by: Dendito on April 28, 2012, 11:27:28 pm
2. You must stop server by clicking "Stop server" button. If you just close window it's pretty much equivalent of just crashing it and there is no warning >:(
Stop server button?
Title: Re: FOnline SDK - Question
Post by: Gob on April 28, 2012, 11:43:08 pm
Stop server button?

LOL..... After the server has started the loop, the text on "Start server" changes to "Stop server".
Title: Re: FOnline SDK - Question
Post by: Mayck on April 28, 2012, 11:45:46 pm
Stop server button?
I believe she meant this one

3.how do i make enemies i want hostile.
Try this:
open mapper click on npc you want to be hostile and write "warehouse_turret" into ScriptName line and "_TurretInit" into FuncName like you see in the pic (that should do the trick, there might be some more appropriate function, but i was lazy to look for it)
Title: Re: FOnline SDK - Question
Post by: barter1113 on April 29, 2012, 11:57:02 am
NMA topic but not tutorial for it. http://www.nma-fallout.com/forum/viewtopic.php?t=60208
Title: Re: FOnline SDK - Question
Post by: Gob on April 29, 2012, 12:29:21 pm
NMA topic but not tutorial for it. http://www.nma-fallout.com/forum/viewtopic.php?t=60208

That is exactly what I'm interested to do :) no tutorials for it :(
Title: Re: FOnline SDK - Question
Post by: Gob on April 29, 2012, 12:50:57 pm
I have found this tutorial on how to edit the existing ones :)

http://falloutmods.wikia.com/wiki/Building_New_Critters_for_Fallout

Then how to make new ones, but you need a character first.

http://falloutmods.wikia.com/wiki/Making_animations_with_3ds_Max_and_FrameAnimator

Didn't quite understand but I will give it a try see how it turns up.

http://falloutmods.wikia.com/wiki/Making_new_walls

This is if you want to make new walls and such, I think it could work for scenery too.
Title: Re: FOnline SDK - Question
Post by: Gob on May 10, 2012, 03:39:58 pm
I've got a problem. The server refuses to compile any scripts I add. I think the FO.dll is missing, can someone reupload it please?
Title: Re: FOnline SDK - Question
Post by: Gob on May 11, 2012, 06:03:17 am
oh lol I'm soo stupid I forgot to add the scripts name in scrits.cfg lol, lol, trololol....
Title: Re: FOnline SDK - Question
Post by: Gob on May 12, 2012, 01:39:23 pm
How can I make a NPC have a patrol path? And maybe say some random text too ?
Title: Need SDK help!!
Post by: Trolleen on May 30, 2012, 06:53:04 am
Me and my brother (Gimper) are trying to get our own server up, but we need a full, in depth, extremely detailed, the best you can find, list of server comands. but mainly we want to know how to change our skins. Please help!
Title: Re: Need SDK help!!
Post by: Gob on May 30, 2012, 07:13:13 am
Some of my tutorials:

http://fodev.net/forum/index.php/topic,12198.0.html   - PART 1
http://fodev.net/forum/index.php/topic,12249.0.html   - PART 2

Title: Re: Need SDK help!!
Post by: JovankaB on May 30, 2012, 07:46:34 am
Me and my brother (Gimper) are trying to get our own server up, but we need a full, in depth, extremely detailed, the best you can find, list of server comands. but mainly we want to know how to change our skins. Please help!

http://fonlinesdk.wikia.com/wiki/Core_Commands

There is no skin command in SDK. The default set of commands that is available in SDK is very limited.
The rest you must add yourself by writing scripts, which is not a trivial task and requires programming skills.
Title: Re: Need SDK help!!
Post by: barter1113 on May 30, 2012, 07:50:18 am
There is no skin command.

Wrong, there is command long time, ha first release of sdk this commands was aviable.

~run debug body 0 IDskin 1

example ~run debug body 0 85 1 horrigan skin.
Title: Re: FOnline SDK - Question
Post by: JovankaB on May 30, 2012, 07:53:24 am
Oh well, I don't play with SDK much :P

But this is not a skin command, it's a command to run server script ;)
Title: Re: FOnline SDK - Question
Post by: barter1113 on June 05, 2012, 08:13:38 pm
Yes but you can change "skin" by this (or maybe it was changed).
Title: Re: FOnline SDK - Question
Post by: Gob on June 05, 2012, 10:36:32 pm
You can find more answers at www.fonline.ru. They have a section dedicated to the SDK only.
Title: Re: FOnline SDK - Question
Post by: ronon dex on June 26, 2012, 06:28:03 am
Hello, I have a problem connecting to your server. I turn on the server, he is loaded without any errors, turn on the client, and writes to me: start executing script failure. please help
Title: Re: FOnline SDK - Question
Post by: JovankaB on June 26, 2012, 06:36:50 am
Hello, I have a problem connecting to your server. I turn on the server, he is loaded without any errors, turn on the client, and writes to me: start executing script failure. please help

Probably you messed something in client scripts. Server console should give details. If you can't fix it, revert all client scripts back to the original.
Title: Re: FOnline SDK - Question
Post by: codave on June 26, 2012, 08:28:28 am
By default cars are visible on the World Map - to everyone.  I know this is a function of being flagged as "GECK" in the object editor, but I can't find anything pertaining to that past the Object Editor...

Short of writing a new script, is there a way to change it so that vehicles are only visible to the person(s) who parked the car there?
Title: Re: FOnline SDK - Question
Post by: Skycast on June 26, 2012, 09:25:47 am
By default cars are visible on the World Map - to everyone.  I know this is a function of being flagged as "GECK" in the object editor, but I can't find anything pertaining to that past the Object Editor...

Short of writing a new script, is there a way to change it so that vehicles are only visible to the person(s) who parked the car there?
Yup you need to uncheck GECK in obj editor and process entering to location by yourself, you can use player.SetKnownLoc (true,location.Id); to show player car location.
Probably server will delete location with car if will be no flag GECK, so you need remove autogarbage from loc and delete loc after car leaving manualy.
Also you can change geck_visible=1 to geck_visible=0 in each enc location in Locations.cfg
Title: Re: FOnline SDK - Question
Post by: codave on June 26, 2012, 11:00:29 am
Yup you need to uncheck GECK in obj editor and process entering to location by yourself, you can use player.SetKnownLoc (true,location.Id); to show player car location.
Probably server will delete location with car if will be no flag GECK, so you need remove autogarbage from loc and delete loc after car leaving manualy.
Also you can change geck_visible=1 to geck_visible=0 in each enc location in Locations.cfg

That's about what I figured.  I'll see what I can't cook up.  Thanks.

ETA -
Ok, spent a few hours on it with no luck.  I'm a little surprised that there isn't documentation anywhere on this.  I can't get a script to bind in the Script/Module in the Object Editor for some reason.  Tomorrow I'll try it another way...
Title: Re: FOnline SDK - Question
Post by: Skycast on June 27, 2012, 08:05:54 am
That's about what I figured.  I'll see what I can't cook up.  Thanks.

ETA -
Ok, spent a few hours on it with no luck.  I'm a little surprised that there isn't documentation anywhere on this.  I can't get a script to bind in the Script/Module in the Object Editor for some reason.  Tomorrow I'll try it another way...
No idea why you want to bind script to car, you just need to set in locations.cfg to all enc maps geck_visible=0, and in script which processing entering to encounters add lines to setknownloc for car driver, you can also process entering with car in map init scripts. 
Title: Re: FOnline SDK - Question
Post by: Bevolard on September 20, 2012, 12:20:54 pm
So how can I get Enemies and everything else run in real time? they only seem to walk for me.
Title: Re: FOnline SDK - Question
Post by: Aquare on September 20, 2012, 03:35:39 pm
Modifying  a code in a file named 'npc_planes.fos'.
Title: Re: FOnline SDK - Question
Post by: Bevolard on September 21, 2012, 09:28:36 am
Ok I am hopeless can anyone head my in the right direction?
Title: Re: FOnline SDK - Question
Post by: Bevolard on September 21, 2012, 09:38:38 am
Modifying  a code in a file named 'npc_planes.fos'.
Ah thanks i got it to work out now they run
Title: Re: FOnline SDK - Question
Post by: Gob on September 21, 2012, 07:42:19 pm
How do you set the time of day on certain map using the mapper? Is there a command list for the mapper or smth?
Title: Re: FOnline SDK - Question
Post by: Bevolard on September 23, 2012, 03:04:55 am
So how do you change how far you can talk to a npc
Title: Re: FOnline SDK - Question
Post by: Wipe on September 23, 2012, 09:13:18 am
How do you set the time of day on certain map using the mapper?
With default mapper scripts, #MapTime <time>

Is there a command list for the mapper or smth?
You have copy in Tools/Mapper/ReadMe.txt (http://xp-dev.com/svn/fonline_sdk/Tools/Mapper/ReadMe.txt)

So how do you change how far you can talk to a npc
Globally: __TalkDistance, see config.fos; per NPC: Critter param ST_TALK_DISTANCE, see _defines.fos
Title: Re: FOnline SDK - Question
Post by: Gob on September 23, 2012, 09:54:36 am
Thanks. Nice avatar btw :).
Title: Re: FOnline SDK - Question
Post by: Bevolard on September 23, 2012, 10:20:41 am
So how do i make/edit an encounter like to make it like unity vs bos
Title: Re: FOnline SDK - Question
Post by: Bevolard on September 24, 2012, 04:06:14 am
How do I make it so I cant see npcs through walls?

I also have a problem with my world map I don't really know how to fix it reveals past the grid and its all uneven
http://tinypic.com/view.php?pic=2n0kinb&s=6
Title: Re: FOnline SDK - Question
Post by: SEGA_RUS on September 24, 2012, 12:10:41 pm
How do I make it so I cant see npcs through walls?
comment this in config.fos
Code: [Select]
__LookChecks |= LOOK_CHECK_DIR;P.S
try to change size of worldmap in config.fos
Code: [Select]
        __GlobalMapWidth            = 28; // Maximum 100 its count of suares on horizontal
        __GlobalMapHeight           = 30; // Maximum 100 its count of suares on vertical
        __GlobalMapZoneLength       = 50; // Maximum 500 its h and y of 1 square of global
        __GlobalMapMaxGroupCount    = 10;
or ask it from one of 2238 devs ;D
and as i see u wana make a 2238 WM
u muct change the mask of WM "Server\maps\relief_tla.png"|
here a message about mask on russian ( (http://www.fonline.ru/forum/showpost.php?p=548953&postcount=19)
Title: Re: FOnline SDK - Question
Post by: Bevolard on September 24, 2012, 12:25:09 pm
yeah i did change the mask but i could not see the whole map so i changed the size and the problem is the grids are not right :/ thanks for the help by the way
Is there a way to disable fog on the world map?
Title: Re: FOnline SDK - Question
Post by: Kilgore on September 25, 2012, 12:28:45 am
Is there a way to disable fog on the world map?
Code: [Select]
void  SetFog (uint16 zoneX, uint16 zoneY, int fog)
An example (from sdk replication.fos):
Code: [Select]
    zoneX = cr.WorldX / __GlobalMapZoneLength;
    zoneY = cr.WorldY / __GlobalMapZoneLength;
    cr.SetFog( zoneX, zoneY, FOG_NONE );
    cr.SetFog( zoneX - 1, zoneY - 1, FOG_HALF );
    cr.SetFog( zoneX, zoneY - 1, FOG_HALF );
    cr.SetFog( zoneX + 1, zoneY - 1, FOG_HALF );
    cr.SetFog( zoneX - 1, zoneY, FOG_HALF );
    cr.SetFog( zoneX + 1, zoneY, FOG_HALF );
    cr.SetFog( zoneX - 1, zoneY + 1, FOG_HALF );
    cr.SetFog( zoneX, zoneY + 1, FOG_HALF );
    cr.SetFog( zoneX + 1, zoneY + 1, FOG_HALF );

Use a simple loop to make whole worldmap visible.
Remember that having worldmap locations visible is a different thing:

Code: [Select]
bool  SetKnownLoc (bool byId, uint locNum)
An example (also from replication.fos):
Code: [Select]
cr.SetKnownLoc( false, LOCATION_BrokenHills );
cr.SetKnownLoc( false, LOCATION_NewReno );
Title: Re: FOnline SDK - Question
Post by: Bevolard on September 25, 2012, 02:53:37 am
yeah i did change the mask but i could not see the whole map so i changed the size and the problem is the grids are not right :/ thanks for the help by the way
Is there a way to disable fog on the world map?
I am very thankful of this

I still want help on this grid problem
http://tinypic.com/view.php?pic=2n0kinb&s=6
and if adding more zones solves this how do i do that?
Title: Re: FOnline SDK - Question
Post by: SEGA_RUS on September 25, 2012, 12:45:00 pm
I still want help on this grid problem
http://tinypic.com/view.php?pic=2n0kinb&s=6
and if adding more zones solves this how do i do that?
kay, I'll try to explain it correctly on steps
1)You need to know how much images in worldmap which u cutted and set this values in default.ini
Code: [Select]
GmapTilesX = 4 //Count of worldmap images on height
GmapTilesY = 5 //Count of worldmap images on width
2)You need to know how much pixels on your worldmap in sum, like 2400x3800 and each value u must divide to
Code: [Select]
__GlobalMapZoneLength = 50; // How much pixels in 1 zone, maxmim is 500and then set this values
Code: [Select]
__GlobalMapWidth = 48; // Maximum 100, just an example
__GlobalMapHeight = 76; // Maximum 100, just an example
same values u need to set in worldmap.fos
Code: [Select]
#define ZONE_COUNT_X (48)
#define ZONE_COUNT_Y (76)
#define ZONE_LENGTH (50)
3)Mask...but u know it from previous message
4)Make shure, that u got equial pieces of worldmap, its VERY IMPORTANT!
Title: Re: FOnline SDK - Question
Post by: ronon dex on September 25, 2012, 04:50:03 pm
I reinstalled my system in a PC. I had to re-download the SDK. somehow I do not remember where the start script. please help, client reports an error and I have still not correct. thank you for your answer.
Title: Re: FOnline SDK - Question
Post by: Bevolard on September 25, 2012, 05:55:27 pm
Thank you SEGA_RUS I now understand :)
Title: Re: FOnline SDK - Question
Post by: Bevolard on September 26, 2012, 02:33:44 pm
I've Noticed That in The Life After, the animation for picking up Objects is the Same as using an item. How can I switch this so That the animation is the Same as dropping or looting? Thanks! :)
Title: Re: FOnline SDK - Question
Post by: Skycast on September 26, 2012, 05:00:10 pm
I've Noticed That in The Life After, the animation for picking up Objects is the Same as using an item. How can I switch this so That the animation is the Same as dropping or looting? Thanks! :)
Open client_main.fos , find
Code: [Select]
case ACTION_PICK_ITEM:
        if( cr.IsLife() && valid( proto ) )
        {
            cr.ClearAnim();
            cr.Animate( 0, proto.GroundLevel ? ANIM2_PICKUP : ANIM2_USE );
        }
        break;

change
Code: [Select]
cr.Animate( 0, proto.GroundLevel ? ANIM2_PICKUP : ANIM2_USE );to
Code: [Select]
if (proto.Type < 8 ) cr.Animate( 0, ANIM2_PICKUP );
else cr.Animate( 0, proto.GroundLevel ? ANIM2_PICKUP : ANIM2_USE );
Title: Re: FOnline SDK - Question
Post by: barter1113 on September 26, 2012, 08:17:55 pm
I've Noticed That in The Life After, the animation for picking up Objects is the Same as using an item. How can I switch this so That the animation is the Same as dropping or looting? Thanks! :)

Anyway, why they change animations? Is it bug?
Title: Re: FOnline SDK - Question
Post by: Skycast on September 27, 2012, 05:05:03 am
Anyway, why they change animations? Is it bug?
Who change animation? It was always like this in sdk.
Title: Re: FOnline SDK - Question
Post by: Bevolard on September 27, 2012, 09:07:05 am
~runscript debug body 1 21 0
When I restart the server it doesn't save the skin is there a way to save it?
Title: Re: FOnline SDK - Question
Post by: Wipe on September 27, 2012, 09:22:18 am
Code: [Select]
if( target.ChangeCrType( param1 ))
    target.StatBase[ST_BASE_CRTYPE] = param1;

Edit: Ah, it's possible that it's set basing on char gender, check main@critter_init - i think TLA is doing so, but not sure.
Title: Re: FOnline SDK - Question
Post by: barter1113 on September 27, 2012, 01:37:13 pm
Who change animation? It was always like this in sdk.

Nope, the old versions (idk which exactly but very old) had normal animations.
Title: Re: FOnline SDK - Question
Post by: Bevolard on September 27, 2012, 04:41:04 pm
I just get a bunch of errors i have no idea what to do
Title: Re: FOnline SDK - Question
Post by: barter1113 on September 27, 2012, 06:11:13 pm
I'm not up to date with the sdk, what is planning for the next revision, for 381?
Title: Re: FOnline SDK - Question
Post by: Bevolard on September 28, 2012, 04:38:55 am
Quote
~runscript debug body 1 21 0
When I restart the server it doesn't save the skin is there a way to save it?

Code: [Select]
if( target.ChangeCrType( param1 ))
    target.StatBase[ST_BASE_CRTYPE] = param1;

Edit: Ah, it's possible that it's set basing on char gender, check main@critter_init - i think TLA is doing so, but not sure.
yeah I need help I don't really know what to do.
Title: Re: FOnline SDK - Question
Post by: Skycast on September 28, 2012, 11:59:35 pm
Something like this:
Code: [Select]
int crType = ( player.Stat[ ST_GENDER ] == GENDER_MALE ? CRTYPE_male_type : CRTYPE_feramle_type );
player.ChangeCrType( crType );
player.StatBase[ ST_BASE_CRTYPE ] = crType;

Some critter types defined in _defines.fos
Code: [Select]
// Dweller
#define CRTYPE_DW_JUMPSUIT_M                     ( 11 )
#define CRTYPE_DW_JUMPSUIT_F                     ( 4 )
#define CRTYPE_DW_LEATHER_JACKET_F               ( 6 )
#define CRTYPE_DW_LEATHER_ARMOR_M                ( 12 )
#define CRTYPE_DW_LEATHER_JACKET_M               ( 13 )
#define CRTYPE_DW_METAL_ARMOR_M                  ( 14 )
#define CRTYPE_DW_TRIBAL_F                       ( 63 )
#define CRTYPE_DW_TRIBAL_M                       ( 64 )

But you can add yours.
Title: Re: FOnline SDK - Question
Post by: Bevolard on September 29, 2012, 12:49:34 pm
ok thanks
Title: Re: FOnline SDK - Question
Post by: codave on October 01, 2012, 03:30:16 am
NVM, figured it out...
Title: Re: FOnline SDK - Question
Post by: Fizzle on October 08, 2012, 06:51:27 pm
How do you delete the flippin tiles?

Like as in: I misplace a tile that is not wanted there, hence the want to delete it/ remove it from where it was laid.
Title: Re: FOnline SDK - Question
Post by: Horatio on October 08, 2012, 07:17:54 pm
You click it and hit "del".
Title: Re: FOnline SDK - Question
Post by: Fizzle on October 08, 2012, 08:00:35 pm
You click it and hit "del".

Hasn't worked for me yet.
Title: Re: FOnline SDK - Question
Post by: Horatio on October 08, 2012, 09:54:56 pm
Place another tile over the unwanted one?
Title: Re: FOnline SDK - Question
Post by: jan0s1k on October 11, 2012, 08:13:30 am
How do you delete the flippin tiles?

Like as in: I misplace a tile that is not wanted there, hence the want to delete it/ remove it from where it was laid.

If you place a tile over another, it will not delete the previous tile, but only the top one will be visible. Of course you don't need the bottom one, so just use #ClearTiles command to get rid of it.
Title: Re: FOnline SDK - Question
Post by: barter1113 on October 14, 2012, 11:39:16 am
Is fonline.ru shutdown?
Title: Re: FOnline SDK - Question
Post by: Mayck on October 14, 2012, 01:33:12 pm
I heard there are some problems with hosting.
Title: Re: FOnline SDK - Question
Post by: barter1113 on October 14, 2012, 02:40:09 pm
Oh, but I hope they won't gonna die.
Title: Re: FOnline SDK - Question
Post by: fonliner on October 18, 2012, 07:31:43 pm
How to enable the possibility of killing NPCs (380 revision)?
Title: Re: FOnline SDK - Question
Post by: Sex Apile on October 24, 2012, 11:24:12 am
Hello Dev's and others
I started a fonline on my localhost, all work fine but i have a little problem.

(http://pix.toile-libre.org/upload/original/1351070376.png)

How remove this weird line, behind the npc.

Thx.
Title: Re: FOnline SDK - Question
Post by: Gob on October 25, 2012, 02:41:05 pm
How to enable the possibility of killing NPCs (380 revision)?

you mean the ones in towns? u gotta disable it in config.fos:

  __NoPvpMaps                 = true;     <--- change to false
Title: Re: FOnline SDK - Question
Post by: codave on November 02, 2012, 12:18:18 am
you mean the ones in towns? u gotta disable it in config.fos:

  __NoPvpMaps                 = true;     <--- change to false

Also, the maps which PvP is blocked are defined in nopvp_maps.fos, so if you wish to keep certain areas NoPvP, you can define exactly which maps you want.  It's right near the top of the script.

const uint[] noPvpMaps =
{

}
Title: Re: FOnline SDK - Question
Post by: Gob on November 05, 2012, 08:13:43 am
how can i make my game use critter.dat and master.dat?
Title: Re: FOnline SDK - Question
Post by: Wipe on November 05, 2012, 05:03:01 pm
how can i make my game use critter.dat and master.dat?

Just add them to DataFiles.cfg, see 2238 config (note that it's stored in separated file to not overwrite user settings when new file is added to list).
Title: Re: FOnline SDK - Question
Post by: Gob on November 06, 2012, 08:07:33 am
Just add them to DataFiles.cfg, see 2238 config (note that it's stored in separated file to not overwrite user settings when new file is added to list).

and I will see whatever the 2 .dat files contain in the mapper right?

I will try it when I get home today :).
Title: Re: FOnline SDK - Question
Post by: Gob on November 07, 2012, 08:14:04 pm
I've seen alot of time ago on the former fonline.ru a clean version of the sdk. Is it still available to download somewhere?
Title: Re: FOnline SDK - Question
Post by: Wipe on November 07, 2012, 09:03:44 pm
I've seen alot of time ago on the former fonline.ru a clean version of the sdk. Is it still available to download somewhere?

One is here (https://xp-dev.com/svn/foserv_clean)... outdated as hell, but shouldn't be (too) hard to merge it with current revision.
Title: Re: FOnline SDK - Question
Post by: fonliner on November 08, 2012, 01:36:59 pm
One is here (https://xp-dev.com/svn/foserv_clean)... outdated as hell, but shouldn't be (too) hard to merge it with current revision.

How do you merge it with current 382 revision?
Title: Re: FOnline SDK - Question
Post by: JovankaB on November 08, 2012, 03:20:17 pm
Replace server/client exes with the newest versions and see what errors/problems pop up.
Title: Re: FOnline SDK - Question
Post by: Skycast on November 08, 2012, 03:25:17 pm
I've seen alot of time ago on the former fonline.ru a clean version of the sdk. Is it still available to download somewhere?
Actually better do it by yourself in this case you will discover much about sdk/functions/etc. :P
Title: Re: FOnline SDK - Question
Post by: Gob on November 08, 2012, 07:20:38 pm
How do you merge it with current 382 revision?

thats the point of a clean sdk... you get ridd of all the TLA content and you can make your server how you want .
Title: Re: FOnline SDK - Question
Post by: fonliner on November 08, 2012, 09:00:38 pm
It would be nice if someone finally made ​​a tutorial on how to use the "clean sdk". I'd love to clean cvet sdk from unusable quests, arts, maps, functions, scripts. After all, FOnline should work on old computers well, and the new one - with the best performance and liquidity. Now it isn't soo good. It is a pity that there aren't specific tutorials. People like me can't do anything else without having to learn the language and the engine - which is quite difficult when you don't have time and don't know the engine.
Title: Re: FOnline SDK - Question
Post by: Gob on November 08, 2012, 09:44:08 pm
It would be nice if someone finally made ​​a tutorial on how to use the "clean sdk". I'd love to clean cvet sdk from unusable quests, arts, maps, functions, scripts. After all, FOnline should work on old computers well, and the new one - with the best performance and liquidity. Now it isn't soo good. It is a pity that there aren't specific tutorials. People like me can't do anything else without having to learn the language and the engine - which is quite difficult when you don't have time and don't know the engine.

well fonline is using AngelScript to make server scripts and stuff, you should learn that.
Title: Re: FOnline SDK - Question
Post by: fonliner on November 18, 2012, 08:47:17 pm
How can I reveal the global map when I get admin access?
Title: Re: FOnline SDK - Question
Post by: Darkenneko on December 27, 2012, 05:39:22 am
Only being a month dead hopefully I'm not going to be considered a necromancer.

I have some questions about the SDK.

I Already have my server up and running and I also have the list of commands, but I need some help because of the lack of documentation.
If anyone could please help I'd be really grateful!

A. How do I change the 10 minute account switch. IE. I play one account, switch off to go get on my GM account I have to wait 10 minutes.

B. Is there anyone who has a default/vanilla pack for English? Most people consider it "done" but what about all the Russian speech? I can't really run it through a translator because in the files it shows up as garbage and not the Russian characters.

Those are what bother me the most right now, any help or tutorials really would be a big plus.

Thanks so much!
Title: Re: FOnline SDK - Question
Post by: JovankaB on December 27, 2012, 07:24:22 am
A. How do I change the 10 minute account switch. IE. I play one account, switch off to go get on my GM account I have to wait 10 minutes.

There is a command for this: ~dropuid
After you type it you will be able to relog immediately.
You need to ~getaccess on tester, moder or admin first to use this command.

If you want to completely remove relog timer, set __AccountPlayTime to 0 in config.fos module.

B. Is there anyone who has a default/vanilla pack for English? Most people consider it "done" but what about all the Russian speech? I can't really run it through a translator because in the files it shows up as garbage and not the Russian characters.

Set encoding of the file in your editor to Windows-1251, you will see Russian characters then.

You can set English as default language server but yea, most texts are missing anyway.
I would ask people doing Requiem or other servers which forked from SDK more recently.
I always hear someone translates it to English but never saw it really done.
Title: Re: FOnline SDK - Question
Post by: Darkenneko on December 27, 2012, 09:40:25 am
Thank you very much!

That helped me a lot!

I got another one if you have time, speak of which.

The timers, for Bartering/Talking, etc. Where can those be adjusted? Probably Config.fos as well right? I probably just skimmed over it.

And I have created/got a couple maps, importing them is probably a pain, is there a link to where I could start trying to get those in game? Thanks a lot, sorry to bother you!
Title: Re: FOnline SDK - Question
Post by: muhoooool on December 27, 2012, 03:29:07 pm
http://www.fallout-3.com/forum/showthread.php?s=a4193b098a486091f8f1bdf76b80ed29&t=4225
Title: Re: FOnline SDK - Question
Post by: elqoro on December 27, 2012, 09:42:32 pm
How change worldmap as FOnline 2238. I found map, cut it and how to use it in game.

config.fos
Code: [Select]
__GlobalMapWidth = 28; // Maximum 100
__GlobalMapHeight   = 30; // Maximum 100
__GlobalMapZoneLength   = 50; // Maximum 500

default.ini
Code: [Select]
GmapTilesPic          = WRLDMP%02d.FRM
GmapTilesX            = 4
GmapTilesY            = 5

And if I want use your map I must credit you tell me if I could.
Title: Re: FOnline SDK - Question
Post by: Gob on December 27, 2012, 11:34:15 pm
You don't need to cut it actually... I found out it works better if you don't. just play arround with the settings untill you get the tile shadowing right.
Title: Re: FOnline SDK - Question
Post by: JovankaB on December 28, 2012, 12:20:04 am
I tried merging 2238 map once but it turned out on some PCs with older graphics cards big (not cut) maps might be not visible.

Lexx published the map on NMA forum: http://www.nma-fallout.com/forum/viewtopic.php?t=52363
Title: Re: FOnline SDK - Question
Post by: elqoro on December 28, 2012, 09:12:26 am
I have that map but how add it as normal map.
Title: Re: FOnline SDK - Question
Post by: Outlawries on January 11, 2013, 11:49:07 am
I have a problem with timeouts and respawn time
i have change it but the timeout wont change neither will the replication time
Title: Re: FOnline SDK - Question
Post by: Wipe on January 11, 2013, 12:34:57 pm
I have a problem with timeouts and respawn time
i have change it but the timeout wont change neither will the replication time

For timeouts you set exact time when it should end, not how long it should be active. If you set it like cr.TimeoutBase[...] = REAL_MINUTE(10), it won't work - you've set timeout to end in deep past. See *_TIMEOUT in _defines.fos, around line 815; all of them uses __FullSecond + something. You can use such defines, or use some generic macro
Code: [Select]
#define _SetTimeout#(cr,timeout,time) cr.TimeoutBase[timeout]=__FullSecond+(time)
...
_SetTimeout( player, TO_REPLICATION, REAL_MINUTE(30) ); // set replication timer
_SetTimeout( player, TO_REPLICATION, 0 ); // clear replication timer

Title: Re: FOnline SDK - Question
Post by: Outlawries on January 12, 2013, 04:38:57 am
Thank you wipe for that
buy my other problem is my game freezes every time i go to world map the loading takes a long time i did change the map so have i done something wrong?
Title: Re: FOnline SDK - Question
Post by: Lexx on January 12, 2013, 04:49:52 pm
Merging the worldmap is bad. Keep it in 500x500px size, for the video memory. Cvet suggested it and that was the sole reason why I've cut it in the first place- and there is no reason not to do it.
Title: Re: FOnline SDK - Question
Post by: Gob on January 12, 2013, 06:42:53 pm
Merging the worldmap is bad. Keep it in 500x500px size, for the video memory. Cvet suggested it and that was the sole reason why I've cut it in the first place- and there is no reason not to do it.

I haven;t cut the map, and it worked fine and I haven't noticed any performance issues eiter.
Title: Re: FOnline SDK - Question
Post by: JovankaB on January 12, 2013, 07:26:47 pm
I haven;t cut the map, and it worked fine and I haven't noticed any performance issues eiter.

It depends on your hardware. People with older machines might see a black background instead
of the WM. It's up to you as a developer to decide if it's worth additional work of cutting WM
to make it displayed properly for people with older PCs.
Title: Re: FOnline SDK - Question
Post by: Outlawries on January 14, 2013, 07:08:39 am
How do I add new 3D models to my sdk?
Title: Re: FOnline SDK - Question
Post by: Gob on January 14, 2013, 05:50:32 pm
How do I add new 3D models to my sdk?

here

http://fodev.net/forum/index.php/topic,26833.0.html
Title: Re: FOnline SDK - Question
Post by: MrCovin on February 21, 2013, 02:04:00 am
I went to the Cathedral (Nort of Modoc) & i called the Brotherhood of steel from a computer;
they said that they will bring me a car including ammos, guns, & other stuffs like that... in 12hours
Anyone knows if it's a joke or not ? i have been waiting for 12 hours around the cathedral on the World Map, & then when i was back....nothing ! :trolled:
So if someone can bring me a few information about it or how to get this car (or to say me if the Brotherhood just make fun of me xD)
Title: Re: FOnline SDK - Question
Post by: MrCovin on February 21, 2013, 02:21:05 pm
aaaaaaaaaaah nice ! thanks a lot ! :D But do i have to stay on the map or can i go to the world map & then come back ? ^^
Title: Re: FOnline SDK - Question
Post by: Nexxos on February 21, 2013, 04:36:13 pm
I miss cargo feature :(
Title: Re: FOnline SDK - Question
Post by: Mike Crosser on February 21, 2013, 06:54:50 pm
I miss cargo feature :(
What is this cargo feature you speak of?
Title: Re: FOnline SDK - Question
Post by: Plech on February 23, 2013, 03:04:20 pm
hello guys, i have a lil question. anyone knows how to change the color of location map cyrcle? for example on 2238 is blue cyrce as tent.
Title: Re: FOnline SDK - Question
Post by: Kilgore on February 23, 2013, 03:50:40 pm
if "loc" is Location@

Code: [Select]
loc.Color = COLOR_CHANGE_ALPHA(COLOR_RGB(0,0,0xC8), 70);
and it should be blue. Cheers.

(COLOR_CHANGE_ALPHA(...) is taken from scripts/_colors.fos btw)
Title: Re: FOnline SDK - Question
Post by: Plech on February 23, 2013, 05:01:36 pm
yeah i found it there, but i dont know where to place it
Title: Re: FOnline SDK - Question
Post by: MrCovin on February 23, 2013, 09:59:10 pm
And how to change the timer for skills ? It's really annoying u_________________u
Title: Re: FOnline SDK - Question
Post by: Berko on February 24, 2013, 11:12:43 am
search in the "defines" file, search for "timeout" and you will find what you want.
You can find example in "main" file (where all start) and search the function critter_use_skill (call when .. critter use skill)
Title: Re: FOnline SDK - Question
Post by: MrCovin on February 24, 2013, 02:38:27 pm
Thanks a lot :D !
Title: Re: FOnline SDK - Question
Post by: MrCovin on February 26, 2013, 04:49:11 pm
Another question:
I'm using the dialog editor to create mercenary (it works well) but when they spawn, they don't wear any armor or guns (they are currently configured with Sulik's AI & they have a leather armor + Hunting rifle & ammo in their inventory).
Do i have to use something special in the dialogeditor to make them use their inventory ?
Title: Re: FOnline SDK - Question
Post by: muhoooool on February 27, 2013, 02:34:30 am
NPCs with bags seem to be equipped, not sure if armor works. If you're using a sulik pid he will not look like he has armor. I wouldnt bother with it more then giving npcs a bag and setting up custom rates for armor.
Title: Re: FOnline SDK - Question
Post by: Demenise on March 24, 2013, 07:51:06 am
How do I remove the flower I get every time I respawn?
or change it to another object?
Title: Re: FOnline SDK - Question
Post by: JovankaB on March 24, 2013, 07:58:43 am
How do I remove the flower I get every time I respawn?
or change it to another object?

replication.fos, look for this line:

Code: [Select]
                _CritAddItem( cr, PID_FLOWER, 1 );
and remove it or change it to another PID.

How did I find it? I searched for "flower" in the replication module.
Ability to find stuff on your own is the most important skill if you want to mess with SDK.
Title: Re: FOnline SDK - Question
Post by: Demenise on March 24, 2013, 08:10:31 am
Thank you so much  ;D
Title: Re: FOnline SDK - Question
Post by: Demenise on March 24, 2013, 12:50:28 pm
On the map editor how can i set grids? i mean when i walk on the green grid it goes to the next map how do i do that?
Title: Re: FOnline SDK - Question
Post by: Lexx on March 24, 2013, 04:24:01 pm
The green grid is just show. You will have to place EG objects and define the target map there.
Title: Re: FOnline SDK - Question
Post by: Bevolard on March 25, 2013, 02:03:18 pm
How do i remove hell so i can just respawn at the nearest replication?
Title: Re: FOnline SDK - Question
Post by: Wind_Drift on April 04, 2013, 08:21:57 am
How do i remove hell so i can just respawn at the nearest replication?

The replication.fos script removes money from the ST_REPLICATION_COST every time you die.  If that stat is below 0 when you die, it replicates you to Hell.

Code: [Select]
if( not dieMapIsHell )
            {
                cr.StatBase[ ST_REPLICATION_MONEY ] -= cr.Stat[ ST_REPLICATION_COST ];
                _CritAddItem( cr, PID_FLOWER, 1 );
                if( cr.Stat[ ST_REPLICATION_MONEY ] >= 100 )
                    _CritAddItem( cr, PID_RADIO, 1 );                                                // Add radio
            }

The easiest fix for the time being is to set the [ST_REPLICATION_COST] to 0 in main.fos, so it will never go below 0 when you die.

You could change the replication script entirely, but this will achieve the desired result.
Title: Re: FOnline SDK - Question
Post by: Demenise on April 04, 2013, 04:11:42 pm
How do I change the action points used for using a gun or throwing a weapon or melee attacks?
because its not in config.fos
Title: Re: FOnline SDK - Question
Post by: Wind_Drift on April 04, 2013, 04:51:40 pm
How do I change the action points used for using a gun or throwing a weapon or melee attacks?
because its not in config.fos

AP cost is determined separately for each weapon, along with it's other stats such as damage, range, etc.

server/proto/items/weapon.fopro

You can open it with the object editor and have a UI to edit things with, but I've always had problem with the damn thing.  If you do, you can open it as a text file in Notepad and edit it that way.

Here's an example:  This is PID_CLUB

[Proto]
ProtoId=5
Type=3
PicMap=art\items\club.frm
PicInv=art\inven\club.frm
Flags=134217758
DisableEgg=1
Stackable=1
Weight=1360
Volume=2
SoundId=48
Cost=30
Material=3
Weapon_Anim1=5
Weapon_MinStrength=3
Weapon_ActiveUses=1
Weapon_CriticalFailture=1
Weapon_Skill_0=204
Weapon_Skill_1=200
Weapon_Skill_2=200
Weapon_DmgType_0=1
Weapon_Anim2_0=Anim2Swing1H
Weapon_PicUse_0=art\intrface\swing.frm
Weapon_PicUse_1=art\intrface\blank.frm
Weapon_PicUse_2=art\intrface\blank.frm
Weapon_DmgMin_0=1
Weapon_DmgMax_0=6
Weapon_MaxDist_0=1
Weapon_ApCost_0=3   <~  Right there is your Action Point cost.
Weapon_Aim_0=1
Weapon_SoundId_0=54

To find out which weapon (or item) is which, look in _itempid.fos
Title: Re: FOnline SDK - Question
Post by: Demenise on April 05, 2013, 06:39:26 am
thank you very helpful ;D
Title: Re: FOnline SDK - Question
Post by: Demenise on April 07, 2013, 01:32:19 pm
is there a way to change the encounter rate?
Title: Re: FOnline SDK - Question
Post by: Demenise on April 08, 2013, 01:47:55 pm
Also how can I hide a location I want to remove the replication areas from the world map
Title: Re: FOnline SDK - Question
Post by: Wind_Drift on April 08, 2013, 06:40:50 pm
Look in /maps/locations.cfg

Find the correct location...

Code: [Select]
[Area 1]
name = Desert
size = 6
map_0 = e_desert1 1
entrance = $0 0
visible = 1
auto_garbage = 1

Change visible to 0, wipe the server.
Title: Re: FOnline SDK - Question
Post by: Demenise on April 08, 2013, 08:04:45 pm
thank you do you also know how to change how frequent the encounters on the world map are?
Title: Re: FOnline SDK - Question
Post by: Wind_Drift on April 08, 2013, 08:39:52 pm
thank you do you also know how to change how frequent the encounters on the world map are?

I believe it's defined in either the server cfg, location.fos, or both. I've never messed with it, so not 100% sure off the top of my head.
Title: Re: FOnline SDK - Question
Post by: Demenise on April 09, 2013, 02:58:54 am
I checked and I dont think its defined in either of them :(
Title: Re: FOnline SDK - Question
Post by: Demenise on April 09, 2013, 09:54:04 am
In my sdk I cant see doors beyond my view distance how do I change it so I can see the doors any where even beyond my view distance
Title: Re: FOnline SDK - Question
Post by: Wipe on April 09, 2013, 10:03:06 am
Set 'always visible' flag in ObjectEditor
Title: Re: FOnline SDK - Question
Post by: Demenise on April 09, 2013, 11:14:25 am
Can anyone suggest to me a good program to create DAT files I tried some from NMA but none of them work.
Title: Re: FOnline SDK - Question
Post by: JovankaB on April 09, 2013, 12:01:02 pm
Fortunately in FOnline you don't have to use DAT format, you can use ZIP instead.
But if you really need to save something in DAT, you can try DAT explorer, it can be found here: http://www.hot.ee/fallout/
Use import menu to put files into DAT.
Title: Re: FOnline SDK - Question
Post by: Demenise on April 10, 2013, 05:30:26 am
in locations.cfg I changed the visibility for the replication maps to 0 and wiped my server completely and they still show up on the world map  so if anyone knows why the replication maps are still showing up on the world map please tell me thanks.
Title: Re: FOnline SDK - Question
Post by: Wind_Drift on April 10, 2013, 06:30:38 am
in locations.cfg I changed the visibility for the replication maps to 0 and wiped my server completely and they still show up on the world map  so if anyone knows why the replication maps are still showing up on the world map please tell me thanks.

Ah, yeah.  Forgot about one thing.  That's what I get for posting from my phone.  :D

replication.fos sets certain locations as known locations, so you just have to /// them out, or remove those lines from the script.

Code: [Select]
void SetStartLocation( Critter& cr ) // Export
{
    Map@ replicator = GetStartReplicatorMap();
    if( not valid( replicator ) )
        return;

    // Hidden fog on default player position
    uint zoneX = cr.WorldX / __GlobalMapZoneLength;
    uint zoneY = cr.WorldY / __GlobalMapZoneLength;
    cr.SetFog( zoneX, zoneY, FOG_FULL );
    cr.SetFog( zoneX - 1, zoneY - 1, FOG_FULL );
    cr.SetFog( zoneX, zoneY - 1, FOG_FULL );
    cr.SetFog( zoneX + 1, zoneY - 1, FOG_FULL );
    cr.SetFog( zoneX - 1, zoneY, FOG_FULL );
    cr.SetFog( zoneX + 1, zoneY, FOG_FULL );
    cr.SetFog( zoneX - 1, zoneY + 1, FOG_FULL );
    cr.SetFog( zoneX, zoneY + 1, FOG_FULL );
    cr.SetFog( zoneX + 1, zoneY + 1, FOG_FULL );

    cr.TransitToMap( replicator.Id, ENTIRE_REPLICATION );

    cr.SetKnownLoc( true, replicator.GetLocation().Id );
    cr.SetKnownLoc( false, LOCATION_ReplicationHell );
    uint16 replPid = replicator.GetLocation().GetProtoId();
    if( replPid == LOCATION_Replication1 )
    {
        cr.SetKnownLoc( false, LOCATION_Den );
        cr.SetKnownLoc( false, LOCATION_Klamath );
    }
    else if( replPid == LOCATION_Replication2 )
    {
        cr.SetKnownLoc( false, LOCATION_Modoc );
    }
    else if( replPid == LOCATION_Replication3 )
    {
        cr.SetKnownLoc( false, LOCATION_Redding );
    }
    else if( replPid == LOCATION_Replication4 )
    {
        cr.SetKnownLoc( false, LOCATION_BrokenHills );
        cr.SetKnownLoc( false, LOCATION_NewReno );
    }

    zoneX = cr.WorldX / __GlobalMapZoneLength;
    zoneY = cr.WorldY / __GlobalMapZoneLength;
    cr.SetFog( zoneX, zoneY, FOG_NONE );
    cr.SetFog( zoneX - 1, zoneY - 1, FOG_HALF );
    cr.SetFog( zoneX, zoneY - 1, FOG_HALF );
    cr.SetFog( zoneX + 1, zoneY - 1, FOG_HALF );
    cr.SetFog( zoneX - 1, zoneY, FOG_HALF );
    cr.SetFog( zoneX + 1, zoneY, FOG_HALF );
    cr.SetFog( zoneX - 1, zoneY + 1, FOG_HALF );
    cr.SetFog( zoneX, zoneY + 1, FOG_HALF );
    cr.SetFog( zoneX + 1, zoneY + 1, FOG_HALF );
}

You can also use this portion of the script to set any other locations on the map you want to be visible on character creation.
Title: Re: FOnline SDK - Question
Post by: Demenise on April 10, 2013, 08:25:47 am
I have a question about replication on the world map ok so if I die I will go to a replication and exit to the world map and when I exit to the world map I am on a black grid until I move to the next grid is there a way I can make it show that grid on the world map as soon as I replicate there?
Title: Re: FOnline SDK - Question
Post by: noizeCode on April 10, 2013, 01:32:47 pm
USE

Code: [Select]
cr.SetFog( zoneX, zoneY, FOG_FULL );
to unfog your desire sector, you can also use FOG_HALF and... FOG_HALF_EX (3/4 Fog) i think it was, you have to look in the defines.fos or macros.fos
Title: Re: FOnline SDK - Question
Post by: Demenise on April 10, 2013, 04:44:18 pm
How can I get NPC's to wear armor so when they die I can loot it but I want them to be wearing the armor in the first place.
Title: Re: FOnline SDK - Question
Post by: noizeCode on April 10, 2013, 05:11:56 pm
Try those lines when initializing your desired critter

Code: [Select]
Item@ armor=cr.AddItem (uint16 protoId, uint count);// Armor, Amount of Armors in Inventory

bool didItWork;

diItWork = cr.MoveItem (uint objId, uint count, uint8 toSlot)//ID =armor.id for id, armor.GetCount()for Amount, SLOT_ARMOR for Armor Slot..:D:D:D

Title: Re: FOnline SDK - Question
Post by: Demenise on April 10, 2013, 11:34:50 pm
how can I make the sierra army depot turrets stronger so there attacks deal more damage?
Title: Re: FOnline SDK - Question
Post by: Wind_Drift on April 11, 2013, 06:10:01 am
The sentry turret weapons are Dual Miniguns (according to awareness function), so in _itempid.fos we see that it's ProtoId 518.

You can open weapon.fopro in a text editor, or object editor, and change it's values like any other weapon.  You can change things like the min/max damage per round, how many rounds are fired in a burst, AP cost, etc.

Code: [Select]
[Proto]
ProtoId=518
Type=3
PicMap=art\items\gunautoc.frm
PicInv=art\inven\gunautoc.frm
Flags=134218143
DisableEgg=1
Deteriorable=1
Weight=4535
Volume=1
SoundId=48
Material=1
Weapon_Anim1=12
Weapon_MaxAmmoCount=800
Weapon_Caliber=6
Weapon_DefaultAmmoPid=35
Weapon_MinStrength=1
Weapon_ActiveUses=1
Weapon_CriticalFailture=2
Weapon_Skill_0=201
Weapon_Skill_1=200
Weapon_Skill_2=200
Weapon_DmgType_0=1
Weapon_Anim2_0=Anim2Burst
Weapon_PicUse_0=art\intrface\burst.frm
Weapon_PicUse_1=art\intrface\blank.frm
Weapon_PicUse_2=art\intrface\blank.frm
Weapon_DmgMin_0=10
Weapon_DmgMax_0=14
Weapon_MaxDist_0=40
Weapon_Round_0=40
Weapon_ApCost_0=6
Weapon_SoundId_0=76


Also, you have other options as well.  Maybe you don't want them to do more DAMAGE, but want to change some of the turrets parameters for other reasons.

Open sad_enter.fomap in text editor or mapper, and you can see the script name and function on the turrets.  It's warehouse_turret@_TurretInit

Here's that function in that script:
Code: [Select]
// Turret functions
void _TurretInit( Critter& turret, bool firstTime )
{
    turret.SetEvent( CRITTER_EVENT_IDLE, "_TurretIdle" );
    turret.SetEvent( CRITTER_EVENT_SHOW_CRITTER, "_TurretShowCritter" );
    turret.SetEvent( CRITTER_EVENT_PLANE_BEGIN, "_TurretBeginPlane" );
    turret.ModeBase[ MODE_UNLIMITED_AMMO ] = 1;
}

You can set different stats for the turret here, also.

For an example, here's the function in replication.fos for the turret in the Hell map:
Code: [Select]
void _TurretInit( Critter& turret, bool firstTime )
{
    turret.StatBase[ ST_PERCEPTION ] = 10;
    turret.SkillBase[ SK_BIG_GUNS ] = 300;
    turret.SkillBase[ SK_ENERGY_WEAPONS ] = 300;
    turret.ModeBase[ MODE_NO_ENEMY_STACK ] = 1;
    turret.ModeBase[ MODE_UNLIMITED_AMMO ] = 1;
}

So you have a few options to make them more challenging, or deadly, or whatever you wish.
Title: Re: FOnline SDK - Question
Post by: Demenise on April 13, 2013, 04:56:35 am
Sometimes ill go into an encounter and die with stuff but after i respawn i go to world map and the encounter is located on the world map only if i drop item there and die is there a way to get rid of it so the encounter doesn't get located on the world map?

Title: Re: FOnline SDK - Question
Post by: Demenise on April 13, 2013, 09:16:17 am
I also have a problem with critters wearing armor in worldmap_init I put .AddItem( PID_LEATHER_JACKET, 1, 1, SLOT_ARMOR ) under the critter id that I wanted to wear it and it worked but i did it for the caravan guards and unity patrol ncr etc.. and they don't wear the armors I wanted them to wear instead they put the items in the inventory why is it doing this it works for some critters?
Title: Re: FOnline SDK - Question
Post by: OmegaPL on April 15, 2013, 03:32:22 pm
if I'm right , appearance of npc depends on it's crittertype or something like that . so if you give it armor , it won't change it's appearance.
You can find crittertype in \proto\critters - "ST_BASE_CRTYPE"
Title: Re: FOnline SDK - Question
Post by: Wipe on April 15, 2013, 06:51:05 pm
if I'm right , appearance of npc depends on it's crittertype or something like that . so if you give it armor , it won't change it's appearance.
You can find crittertype in \proto\critters - "ST_BASE_CRTYPE"
CrType limitations of wearing armor (and other things) are defined in data/CritterTypes.cfg, protos have nothing to do with that. Default scripts callbacks, in critter_item_movement module, won't allow any critter to use any armor if that's how it's set in .cfg
Title: Re: FOnline SDK - Question
Post by: Wind_Drift on April 16, 2013, 08:42:19 am
CrType limitations of wearing armor (and other things) are defined in data/CritterTypes.cfg, protos have nothing to do with that. Default scripts callbacks, in critter_item_movement module, won't allow any critter to use any armor if that's how it's set in .cfg

So basically, in the "Ar" column, we change the 0 to a 1 to allow that critter to wear armor we specify in their armor slot?
Title: Re: FOnline SDK - Question
Post by: Wipe on April 16, 2013, 12:30:04 pm
Without going into too much details: yea, that will do the trick.
Title: Re: FOnline SDK - Question
Post by: Demenise on April 16, 2013, 12:49:28 pm
ok cool thanks  ;D

Does anyone know anything about those encounters being kept on the world map?
Title: Re: FOnline SDK - Question
Post by: MrCovin on April 18, 2013, 02:00:40 am
How is it possible to make NPC's barter ? I tried writing this on a NPC properties with the mapper:
ScriptName           trader
FuncName             _TraderInit

Then when i try to barter with the NPC, he doesn't want .... maybe someone got some tips to fix the problem ?
Title: Re: FOnline SDK - Question
Post by: wladimiiir on April 21, 2013, 09:17:20 pm
How is it possible to make NPC's barter ? I tried writing this on a NPC properties with the mapper:
ScriptName           trader
FuncName             _TraderInit

Then when i try to barter with the NPC, he doesn't want .... maybe someone got some tips to fix the problem ?
Make sure that your NPC has MODE_NO_BARTER set to 0 (otherwise the message "You cannot trade with this person." will be shown).

Code: [Select]
npc.ModeBase[MODE_NO_BARTER] = 0;
Title: Re: FOnline SDK - Question
Post by: Ras on April 22, 2013, 03:00:38 pm
I have a question.
Does anyone know how to set random spawn player in encounter map when someone enter inside.
Although they are added many enter points, player still appears only on the same one
Title: Re: FOnline SDK - Question
Post by: wladimiiir on April 23, 2013, 09:27:12 am
In function worldmap@GenerateEncounter there should be this part of code:
Code: [Select]
uint16 startX = 0, startY = 0;
if( not map.GetEntireCoords( 0, 0, startX, startY ) )
{
    Log( "Default entire not found." );
    return null;
}
fe.StartHexX = startX;
fe.StartHexY = startY;

StartHexY and StartHexY should be the coordinates of place where you will spawn. You can change it like in the following example to have random spawn location:
Code: [Select]
uint16 startX = 0, startY = 0;

Entire[] entires;
ParseEntires(map, entires, 0); //0 - entire num

if(entires.length() == 0)
{
    Log( "Default entire not found." );
    return null;
}
uint index = Random(0, entires.length() - 1);
fe.StartHexX = entires[index].HexX;
fe.StartHexY = entires[index].HexY;

In the example above, you will also have to include entire.fos to the script.
Code: [Select]
#include "entire.fos"
Title: Re: FOnline SDK - Question
Post by: Ras on April 24, 2013, 08:14:05 pm
In function worldmap@GenerateEncounter there should be this part of code:
Code: [Select]
uint16 startX = 0, startY = 0;
if( not map.GetEntireCoords( 0, 0, startX, startY ) )
...

Works fine, thx man !
Title: Re: FOnline SDK - Question
Post by: MrCovin on April 25, 2013, 03:05:24 pm
Make sure that your NPC has MODE_NO_BARTER set to 0 (otherwise the message "You cannot trade with this person." will be shown).

Code: [Select]
npc.ModeBase[MODE_NO_BARTER] = 0;

Thanks a lot :)
Title: Re: FOnline SDK - Question
Post by: MrCovin on April 26, 2013, 01:34:49 am
I saw that a 'NCR Invasion' exist, how does it works ? What npc can provides me this quest ?
Title: Re: FOnline SDK - Question
Post by: wladimiiir on May 10, 2013, 08:45:07 am
Is it possible to set to a wall scenery that you can see through it, but you cannot shoot through it (e.g. bulletproof window)? Seems like when I uncheck ShootThru, then also I cannot see through the object. Thanks.
Title: Re: FOnline SDK - Question
Post by: Gob on May 10, 2013, 08:51:43 am
Is it possible to set to a wall scenery that you can see through it, but you cannot shoot through it (e.g. bulletproof window)? Seems like when I uncheck ShootThru, then also I cannot see through the object. Thanks.

there are some blockers i think they are the blue ones check the readme
Title: Re: FOnline SDK - Question
Post by: JovankaB on May 10, 2013, 09:22:15 am
Is it possible to set to a wall scenery that you can see through it, but you cannot shoot through it (e.g. bulletproof window)? Seems like when I uncheck ShootThru, then also I cannot see through the object. Thanks.

no

In theory you could make the glass wall unpickable, shootThru item and add a check in combat.fos if the item is between attacker and the attacked character (perhaps for optimization store somewhere boolean if such item in a map exists at all) - and make the attack fail, with some special effects, explosion if it's rocket etc. or make it as invisble hex marker with same function
Title: Re: FOnline SDK - Question
Post by: Mayck on May 10, 2013, 09:45:01 am
Is it possible to set to a wall scenery that you can see through it, but you cannot shoot through it (e.g. bulletproof window)? Seems like when I uncheck ShootThru, then also I cannot see through the object. Thanks.
It actually is... there are two ways to do so:
1) either you write your own check_look function so it uses some other flag than ShootThru, however if you would want to do this it would be better to write native extension (put it in .dll). This one is a lot of work.


2) Using an engine glitch, which i am not sure if still works (last time i tried it was 2 years ago). This one is easier, but can be a pain in the ass to mantain (also note it was working only for static scenery and not items):
Downside of this is that (if it still works) you have to repeat these steps everytime you edit any map with bullet proof glass or somehow cause the maps recompilation by other means(like deleting its .fomapb counter-part).
Title: Re: FOnline SDK - Question
Post by: wladimiiir on May 10, 2013, 01:59:36 pm
Thanks very much. The 2nd solution looks like a hack to me, so I will skip that ;D

I was thinking about doing it as you proposed in 1st solution and I already have my own check_look function, so that should not be a problem to modify. But the problem I see in this is that, if I am not mistaken, FOV lines (Q) will be shown incorrectly as they are not using the custom check_look function to draw themselves (and as they are hardcoded I cannot do much there), or not?
Title: Re: FOnline SDK - Question
Post by: wladimiiir on May 17, 2013, 08:53:51 am
there are some blockers i think they are the blue ones check the readme
no

In theory you could make the glass wall unpickable, shootThru item and add a check in combat.fos if the item is between attacker and the attacked character (perhaps for optimization store somewhere boolean if such item in a map exists at all) - and make the attack fail, with some special effects, explosion if it's rocket etc. or make it as invisble hex marker with same function
I am sorry, I somehow missed your answers, so thanks for some tips.

I didn't try the blue blockers, but I might do that later, but I tried check in combat.fos, but the problem with that is that Events (Attack, SeeSmthAttack) before the combat.fos function, so that is insufficient in my case.

I used modified check_look function with some special hex scenery, but I think I will also try Gob's solution to not have possible and unnecessary performance drop while checking it in the function.
Title: Re: FOnline SDK - Question
Post by: E3245 on May 18, 2013, 09:29:01 am
Hi, I'm new here.
Is it possible to convert Fallout 1 maps to FOnline? Tried googling it but no hits.
Title: Re: FOnline SDK - Question
Post by: Lexx on May 18, 2013, 10:52:24 am
Yes, but you will need some older versions of the fonline mapper for this. Then you open the map with the original BIS mapper, save it. Then you open and save it with a modified version of Dimms mapper (not sure if it is in the SDK), then you open and save it with a old version of the fonline mapper, again with one of the next newer versions and again and again... No idea what versions exactly.

That's what we did in 2009, at least. BIS mapper -> modified Dimms mapper -> fonline mapper -> done.
Title: Re: FOnline SDK - Question
Post by: Mayck on May 18, 2013, 12:46:01 pm
I remember there used to be a package of Fallout2 maps converted into newer fonline mapper format somewhere on fonline.ru, perhaps someone did the same for Fallout1 maps too.
Title: Re: FOnline SDK - Question
Post by: Wipe on May 18, 2013, 01:30:24 pm
http://forum.newfmc.pl/index.php?topic=122.msg2698#msg2698
Title: Re: FOnline SDK - Question
Post by: E3245 on May 18, 2013, 05:22:41 pm
Thank you.
Another question, is it possible to make a separate world on FOnline? Like you have to go to a caravan or something to get to Southern California and back to Northern California?
Title: Re: FOnline SDK - Question
Post by: Mike Crosser on May 18, 2013, 10:17:04 pm
Thank you.
Another question, is it possible to make a separate world on FOnline? Like you have to go to a caravan or something to get to Southern California and back to Northern California?
You mean changing the WMs ingame?
Title: Re: FOnline SDK - Question
Post by: Gob on May 18, 2013, 11:04:56 pm
You mean changing the WMs ingame?

no he meant like the server running multiple instances all connect to the same DB. So like when you move from an instance to another you take all your shit(items) with you. at least that's what i thought he wanted to say... prolly something similar to dayz.. i'm sure it could be possible but hard to do
Title: Re: FOnline SDK - Question
Post by: Lexx on May 19, 2013, 12:14:22 am
I think it is about having more than one worldmap and the player would be able to travel between them.

I'll guess it should be possible, but only with a lot script work.
Title: Re: FOnline SDK - Question
Post by: E3245 on May 19, 2013, 10:41:33 am
I'll keep that in mind.
Now, another question. How do I change the requirements like the number of players required to raid a town?
Additionally, how to I give myself a base without having to go through the dialogs?
Title: Re: FOnline SDK - Question
Post by: Gob on May 19, 2013, 07:01:12 pm
I think it is about having more than one worldmap and the player would be able to travel between them.

I'll guess it should be possible, but only with a lot script work.

Nah a friend of mine did it, it wasn't that hard.  His username is Jenova here on the forum.
Title: Re: FOnline SDK - Question
Post by: Lexx on May 19, 2013, 10:06:22 pm
How did he dealed with the encounter setup and stuff?
Title: Re: FOnline SDK - Question
Post by: Skycast on May 20, 2013, 12:09:48 am
How did he dealed with the encounter setup and stuff?
As i remember create real(not just one wm splitted to two)two different WM's is impossible.
Title: Re: FOnline SDK - Question
Post by: Mayck on May 20, 2013, 11:37:07 am
As i remember create real(not just one wm splitted to two)two different WM's is impossible.
I believe it is possible, if one codes a WM iface from scratch.
Title: Re: FOnline SDK - Question
Post by: Alvarez on May 20, 2013, 01:57:39 pm
Is it possible to script moving hex blockers which surround a player in a formation depending on his faced direction?
Title: Re: FOnline SDK - Question
Post by: wladimiiir on May 20, 2013, 03:18:02 pm
Is it possible to script moving hex blockers which surround a player in a formation depending on his faced direction?
I guess you would need some time event (e.g. every 1s), which checks the location of your player and recreates blockers according to your needs.
Title: Re: FOnline SDK - Question
Post by: E3245 on May 24, 2013, 04:39:43 am
Whatever happened to FOnline: 2238? Did they also release an SDK or is that just for TLA?
Title: Re: FOnline SDK - Question
Post by: JovankaB on May 24, 2013, 06:15:11 am
Whatever happened to FOnline: 2238? Did they also release an SDK or is that just for TLA?

We did not release an SDK.
Development/SDK is a board for any technical discussion related to developing games with FOnline engine.
You can also share your work here if you want. It was created, because there was no other place like this
exclusively for English-speaking people. FOnline.ru is primarily filled with Russians writing in Cyrillic.
Title: Re: FOnline SDK - Question
Post by: E3245 on May 25, 2013, 09:27:14 am
I have 2 questions:
1) How would I make a script for a weapon with a silencer? Like other people around the enemy would not hear it as well.

2) How can I make the weapon shoot out grenades without wasting the bullet, as if the grenade doesn't count as a shot fired, or the grenade launcher uses separate ammo from the gun?
Title: Re: FOnline SDK - Question
Post by: Wipe on May 25, 2013, 12:44:09 pm
Sound is made when engine calls reserved critter_action function (ACTION_USE_WEAPON). Just make scripts skip PlaySound() when specific weapon is used.
Title: Re: FOnline SDK - Question
Post by: E3245 on May 26, 2013, 08:13:01 am
Sound is made when engine calls reserved critter_action function (ACTION_USE_WEAPON). Just make scripts skip PlaySound() when specific weapon is used.

Can you show me how to script this in the weapon? I am new to this.
Title: Re: FOnline SDK - Question
Post by: Wipe on May 27, 2013, 09:32:46 am
Blocks sound for specific PID only

Blocks sound for many proto items, allows to set which weapons should be silent via ObjectEditor (creates "Weapon"->"Custom" tab, where it can be set).

If you still want attacker to hear some sound like in typical action movies (pling!), you need to tune server scripts a bit. I'm not doing combat stuff, so i won't even guess where, but call itself can be something like that.





All that is just a fast c/p fest, i didn't actually test if it works at all :)
Title: Re: FOnline SDK - Question
Post by: E3245 on May 27, 2013, 11:51:45 am
Thank you Wipe. What about the second question
2) How can I make the weapon shoot out grenades without wasting the bullet, as if the grenade doesn't count as a shot fired, or the grenade launcher uses separate ammo from the gun?

I don't really know how to explain it without making it 2 weapons. I tried to add it as Attack 3 in the Object Editor but Single and Burst only shows up.
Title: Re: FOnline SDK - Question
Post by: Ganado on June 05, 2013, 11:01:40 pm
This might end up being a ridiculously easy answer, but what is the proper way to wipe the server? Some changes I did don't seem to be putting into effect.

And also specifically when is wiping the server needed?
Title: Re: FOnline SDK - Question
Post by: JovankaB on June 05, 2013, 11:20:45 pm
This might end up being a ridiculously easy answer, but what is the proper way to wipe the server?

You just have to delete some files where server data is saved:
http://fodev.net/forum/index.php/topic,28429.msg245155.html#msg245155


And also specifically when is wiping the server needed?

Wiping server is basically like starting a game from the beginning. There might be different reasons, for example if you make big changes in game, for example in economy starting from "clean" situation when players don't have thousands of items from previous economy might make the most sense. Or in case if perk system is changed to not have character accounts from previous system. Or for example if we completely reworked base system, without wipe we would still have hundreds of bases from previous system.

It's actually almost never necessary even with big changes, it just might be desirable to not have new versions of game featuers polluted with outcomes of previous versions.

Title: Re: FOnline SDK - Question
Post by: Ganado on June 05, 2013, 11:28:41 pm
Okay so from a technical standpoint the changes I make should take effect (not talking about specific characters already made) without wiping the server. Alright thanks.

Edit: Okay, the changes I made are taking effect this time, not sure what I did wrong the months ago that I tried this, but thanks again.
Title: Re: FOnline SDK - Question
Post by: JovankaB on June 05, 2013, 11:31:16 pm
Yup. In most cases restarting server is enough. When it comes to items or NPCs on maps, regenerating the map is necessary.
Title: Re: FOnline SDK - Question
Post by: Ganado on June 06, 2013, 05:10:24 am
I have some questions about the single-player options on this. Using newest revision 406.

I read http://fodev.net/forum/index.php/topic,8776.msg154560.html#msg154560 (and posts around it) though it doesn't seem to apply because when I clicked on the FOnlineSingleplayer.exe file, it acts as if it is a Shortcut and tried to direct me to "D:\Repozes\sdk\Client" which does not exist. At http://xp-dev.com/svn/fonline_sdk/Client/ it lists it as a .lnk file and it's only 1 KB large.

I remember it working when I tried this months ago, but I don't remember much about it.

Does the single-player mode have its own save system? If so, if you die, does it by default load the last save? If not, what does it do, and is this hard to change?
Title: Re: FOnline SDK - Question
Post by: JovankaB on June 06, 2013, 08:31:27 am
It is indeed just a shortcut. You start client with "Singleplayer" parameter:

FOnline.exe Singleplayer

and then server app will be run in background for the client

I'm not sure how the mode exactly works, save-wise etc, never really tried it.
Title: Re: FOnline SDK - Question
Post by: Ganado on June 06, 2013, 03:26:23 pm
Okay, I changed the Target location of the shortcut to where I had my client, and it is loading now with a "New Game" "Load Game" settings, so it seems to work fine, thanks. (It doesn't like spaces in the folder name, and I was assuming that the singleplayer client was supposed to be separate from the regular one)
Title: Re: FOnline SDK - Question
Post by: E3245 on June 07, 2013, 10:15:04 am
How would I suppose changing the background to a silent video playing or a 3d render of something like a deathclaw?
Title: Re: FOnline SDK - Question
Post by: Wind_Drift on June 14, 2013, 09:11:58 am
This is most likely a stupid question, and the answer is likely staring me in the face.  It has to do with dialog/editor.

Say I have a dialog, and each answer directs back to the same dialog.  The first time everything is in order, but each subsequent time the answers are out of order.

Example:

(First time)

[]-[2] Would you like punched in the face? (Choose how many times you want punched in the face)
    []-[->2] Punch me in the face one time.
    []-[->2] Punch me in the face three times.
    []-[->2] Punch me in the face five times.
    []-[->Exit] That sounds like a bad deal, no punches plox.

Say I choose to be punched in the face one time... I click that answer, and it looks like this on the second option.

[]-[2] Would you like punched in the face? (Choose how many times you want punched in the face)
    []-[->2] Punch me in the face five times.
    []-[->2] Punch me in the face one time.
    []-[->Exit] That sounds like a bad deal, no punches plox.
    []-[->2] Punch me in the face three times.


Why is it doing that, and how am I able to "fix" it so that each time an answer is selected it reloads the answers in the correct order?
Title: Re: FOnline SDK - Question
Post by: wladimiiir on June 14, 2013, 10:15:47 am
If you want to do it globally, then go to config.fos and look for:
Code: [Select]
__NoAnswerShuffle = false;Set it to true and you are done. :)

But you can also set it in Dialog editor, where for each dialog (NPC answer) there is "No shuffle answers" option there, so just check it for each one you don't want to have shuffled answers. ;)
Title: Re: FOnline SDK - Question
Post by: Wind_Drift on June 14, 2013, 10:45:43 am
If you want to do it globally, then go to config.fos and look for:
Code: [Select]
__NoAnswerShuffle = false;Set it to true and you are done. :)

But you can also set it in Dialog editor, where for each dialog (NPC answer) there is "No shuffle answers" option there, so just check it for each one you don't want to have shuffled answers. ;)

See, I knew it was something simple. 

That's been driving me crazy all night, thank you.

 ;D
Title: Re: FOnline SDK - Question
Post by: wladimiiir on June 14, 2013, 02:45:26 pm
See, I knew it was something simple. 

That's been driving me crazy all night, thank you.

 ;D
I advice to see (and understand) all variables that can be configured in config.fos, so you don't any more sleepless night. ;)
Title: Re: FOnline SDK - Question
Post by: Wind_Drift on June 14, 2013, 05:06:18 pm
I advice to see (and understand) all variables that can be configured in config.fos, so you don't any more sleepless night. ;)

Most of them I understand, but I "set it and forgot it", and haven't looked at it for quite a while.

 ;D

I do appreciate the help.
Title: Re: FOnline SDK - Question
Post by: fonliner on June 17, 2013, 07:11:01 pm
Have you noticed drop in performance in the latest version of sdk?
Title: Re: FOnline SDK - Question
Post by: Bartosz on June 18, 2013, 07:43:23 am
Have you noticed drop in performance in the latest version of sdk?

What particularily?
Title: Re: FOnline SDK - Question
Post by: fonliner on June 18, 2013, 10:04:40 am
When you move the screen is not smooth and fast. Also I do not know how to set fixed fps. When I have 100 I can not play, for me it is too low fps. When I set fixed fps to 1000, it is better but I only get around 150 fps and it can be not smooth. I noticed that in 2238 the screen moving is smoothly, better than the default sdk.
Title: Re: FOnline SDK - Question
Post by: Skycast on June 18, 2013, 01:53:39 pm
When you move the screen is not smooth and fast. Also I do not know how to set fixed fps. When I have 100 I can not play, for me it is too low fps. When I set fixed fps to 1000, it is better but I only get around 150 fps and it can be not smooth. I noticed that in 2238 the screen moving is smoothly, better than the default sdk.
Hm didn't noticed anything like this, maybe it is because you running sdk server on same pc , and it decrease client performance.
Title: Re: FOnline SDK - Question
Post by: fonliner on June 18, 2013, 04:10:49 pm
Yes, I run server on this same pc (localhost server).
Title: Re: FOnline SDK - Question
Post by: Wind_Drift on June 18, 2013, 05:51:01 pm
When you move the screen is not smooth and fast. Also I do not know how to set fixed fps. When I have 100 I can not play, for me it is too low fps. When I set fixed fps to 1000, it is better but I only get around 150 fps and it can be not smooth. I noticed that in 2238 the screen moving is smoothly, better than the default sdk.

Was this when the SDK was fresh, too?  I mean before you modified anything.  I've had some goofy code cause lags, etc, before.
Title: Re: FOnline SDK - Question
Post by: fonliner on June 18, 2013, 06:51:09 pm
I use default sdk 407 version without any new content.
Title: Re: FOnline SDK - Question
Post by: Berko on June 18, 2013, 08:56:01 pm
60 fps is enough. Also change fps parameter to 0 to automatically get maximum perf (as you look to want make your cpu hot and laggy).

Also do you run the directx version or the opengl version? Recent update was done on Linux compatibility if I'm not wrong.

And you can change your "screen move" speed as it's a parameter maybe you think it's laggy but it's not? I remember first days trying SDK with default client values I was "Move up fucking screen!!!", changed config and it's was better after :)
Title: Re: FOnline SDK - Question
Post by: Wind_Drift on June 18, 2013, 09:49:13 pm
And you can change your "screen move" speed as it's a parameter maybe you think it's laggy but it's not? I remember first days trying SDK with default client values I was "Move up fucking screen!!!", changed config and it's was better after :)

+1 on this

If it's default SDK without any changes, and your computer isn't made of cheese, I would guess this is the most likely culprit.
Title: Re: FOnline SDK - Question
Post by: Wind_Drift on June 18, 2013, 11:46:55 pm
I also have a problem with critters wearing armor in worldmap_init I put .AddItem( PID_LEATHER_JACKET, 1, 1, SLOT_ARMOR ) under the critter id that I wanted to wear it and it worked but i did it for the caravan guards and unity patrol ncr etc.. and they don't wear the armors I wanted them to wear instead they put the items in the inventory why is it doing this it works for some critters?

Figured this one out.

In worldmap_init when the critters are initialized, it'll have their script defined as well.  For NPC groups like Raiders, etc... it'll have "encounter_npc@_NpcInit", or something similar.

Go to encounter_npc.fos, find this part, and add in the "favorite armor" sections.  Or just copypasta this...

Code: [Select]
void _NpcInit( Critter& npc, bool firstTime )
{
    uint bt = npc.Stat[ ST_BODY_TYPE ];
    if( bt >= BT_MEN && bt <= BT_GHOUL )
    {
        npc.SetEvent( CRITTER_EVENT_MESSAGE, "_NpcMessage"     );
        npc.SetEvent( CRITTER_EVENT_DEAD, "_NpcDead"        );
        npc.SetEvent( CRITTER_EVENT_SMTH_DEAD, "_NpcSmthDead"    );
        npc.SetEvent( CRITTER_EVENT_SMTH_USE_SKILL, "_NpcSmthUseSkill" );
        npc.SetEvent( CRITTER_EVENT_PLANE_END, "_NpcPlaneEnd"    );
        npc.SetEvent( CRITTER_EVENT_STEALING, "_NpcStealing"    );
        npc.SetEvent( CRITTER_EVENT_SMTH_USE_ITEM, "_NpcSmthUseItem" );
        npc.SetEvent( CRITTER_EVENT_SMTH_DROP_ITEM, "_NpcSmthDropItem" );

        Item@[] items;
        npc.GetItems( -1, items );
        bool favrtAmmoSet = false;
        bool favrtWpnSet  = false;
bool favArmor = false;
        for( uint i = 0, j = items.length(); i < j; i++ )
        {
            SetDeterioration( items[ i ], Random( 80, 95 ) );
            if( items[ i ].GetType() == ITEM_TYPE_WEAPON && !favrtWpnSet )
            {
                npc.SetFavoriteItem( SLOT_HAND1, items[ i ].GetProtoId() );
                favrtWpnSet = true;


            }

        }
for( uint i = 0, j = items.length(); i < j; i++ )
{
SetDeterioration( items[ i ], Random( 60, 85 ) );
if( items[ i ].GetType() == ITEM_TYPE_ARMOR && !favArmor )
{
npc.SetFavoriteItem( SLOT_ARMOR, items[ i ].GetProtoId() );
favArmor = true;
}
}

    }
}

I haven't exactly figured out how to make it drop to their inventory slot on death, but I'm working on it.

This will at least make them WEAR the armor, and not take it off the second they get the chance.
Title: Re: FOnline SDK - Question
Post by: fonliner on June 19, 2013, 09:30:10 am
Hey guys, can you tell me what config is good? Also I would like to know if it is ok use 1440x900 window mode.And yes I run direct version, not open gl.

Title: Re: FOnline SDK - Question
Post by: Wind_Drift on June 19, 2013, 12:34:31 pm
Hey guys, can you tell me what config is good? Also I would like to know if it is ok use 1440x900 window mode.And yes I run direct version, not open gl.

I set my scroll step at 32, but you would probably get the results you want by comparing your 2238 settings to what you have running in the SDK config.

 ;D
Title: Re: FOnline SDK - Question
Post by: wladimiiir on June 24, 2013, 03:16:16 pm
Is there some other function on Client side, that acts like Critter#RefreshVisible()? So some function that refreshes FOV (e.g. after Dir change).
Title: Re: FOnline SDK - Question
Post by: Outlawries on June 28, 2013, 02:04:51 pm
How can I make encounters more frequent?
Title: Re: FOnline SDK - Question
Post by: wladimiiir 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):
Title: Re: FOnline SDK - Question
Post by: Outlawries 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?
Title: Re: FOnline SDK - Question
Post by: wladimiiir 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?
Title: Re: FOnline SDK - Question
Post by: Outlawries 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
Title: Re: FOnline SDK - Question
Post by: Bartosz 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?
Title: Re: FOnline SDK - Question
Post by: wladimiiir 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? ???
Title: Re: FOnline SDK - Question
Post by: Outlawries on July 02, 2013, 03:06:14 pm
I was wondering how do I make traders in my sdk?
Title: Re: FOnline SDK - Question
Post by: E3245 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. :(
Title: Re: FOnline SDK - Question
Post by: Doctor Who on August 13, 2013, 11:17:11 pm
How do I connect to my server from another PC?
Title: Re: FOnline SDK - Question
Post by: Svhirs 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?
Title: Re: FOnline SDK - Question
Post by: kompreSor on September 03, 2013, 02:19:25 pm
How make turnbase in towns? (in BH, redding etc.)
Title: Re: FOnline SDK - Question
Post by: Wipe 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 );
            }
        }
    }
}
Title: Re: FOnline SDK - Question
Post by: Majin 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.
Title: Re: FOnline SDK - Question
Post by: JovankaB 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++ (http://notepad-plus-plus.org/).
Title: Re: FOnline SDK - Question
Post by: Majin 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++ (http://notepad-plus-plus.org/).

I love you.
Title: Re: FOnline SDK - Question
Post by: Wipe on September 05, 2013, 05:05:44 pm
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".
Map names are unused by scripts, all what you work on are Locations and Maps PIDs (Prototype ID). From basic commands provided by engine, ~addloc wil be the one interesting you. Depending on what server you work on, there might be scripted commands too. In any case, they create new Location instance (and optionally teleport you into first Map of it) what is enough for testing purposes.
 
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.  :-[
One of biggest problems of FOnline :P If you need to get examples, you have to make research on your own, sadly~

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.
Obsolete; leftover from previosly used SDK mechanics, where Locations and Maps was defined in separated files.
Title: Re: FOnline SDK - Question
Post by: GeneralSturnn on November 01, 2013, 05:31:30 pm
Alright, I finally got it set up(after finally deciding to take a minute to read and such) but here's some questions that popped up:

can I use Tunngle(it provides me an IP address) to have people join my network as long as they have Tunngle?

I've noticed some text is in Russian(the NPC's that aren't controlled by the language filter) how can I change that?
Title: Re: FOnline SDK - Question
Post by: John Porno on November 01, 2013, 05:57:12 pm
I was able to have friends connect to my server via hamachi so I guess tunngle would work.
Title: Re: FOnline SDK - Question
Post by: GeneralSturnn on November 01, 2013, 07:00:02 pm
Alright, that answered one question, and to you/anyone, what about the character chats in Russian?

figured out how to open the "console" and now my problem is it's in Russian.
Title: Re: FOnline SDK - Question
Post by: loord on September 12, 2016, 05:40:00 pm
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 );
            }
        }
    }
}

Nice that is possible set all locations in one place. How implement to this code players settings (combat mode depends on config) ?
Title: Re: FOnline SDK - Question
Post by: Klaatu on December 20, 2016, 05:51:50 pm
Is there any commands that would allow me to reset/redo quests?
If so where can I find the quest ID's?
I'm also interested in this. I'm considering rerolling my character(s), but I'd like to keep all the stats. I'd also like to be able to retry certain quests, if something goes wrong on the first try and the quest fails. Therefore, I present to you these questions:

1. How do I change the status of a quest (failed, completed, in progress)?
2. Is there a way to give / remove a quest from a character?
3. How do I set a character's town reputation level?
4. How do I set kill counts?
5. Is there a way to "purge" faction member database and prevent it from being cluttered by "player not found" entries? Or alternatively, is there a way to create a new character with the same ID as the old one?
Title: Re: FOnline SDK - Question
Post by: Lexx on December 21, 2016, 09:00:52 am
You will have to reset the local variables of the character. There is no unified "undo quest x" command, as they are basically just a bunch of variables.
Title: Re: FOnline SDK - Question
Post by: Klaatu on December 26, 2016, 08:01:37 pm
You will have to reset the local variables of the character. There is no unified "undo quest x" command, as they are basically just a bunch of variables.
Thanks for the hint, I was able to figure out how to change kill counts, reputation values and quest statuses. It took a bit of digging, but eventually it paid off. This is how kill counts and reputation values can be set, in case someone else is wondering the same thing. The clues were found in _defines.fos file.

Kills:
`param 0 260 3
   --> Kills: 3 men
260 Men
261 Women
262 Children
263 Super Mutants
264 Ghouls
265 Brahmin
266 Radscorpions
267 Rats
268 Floaters
269 Centaurs
270 Robots
271 Dogs
272 Manti
273 DeathClaws
274 Plants
275 Geckos
276 Aliens
277 Giant Ants
278 Big Bad Boss
279 Desert Stalkers
280 Venus Man Traps
281 Rad Toads
282 Thornslingers
283 Pashtshuurs

Reputation:
`param 0 602 3
   --> Brotherhood of Steel reputation 3
602 Brotherhood of Steel
603 The Enclave
604 The Unity
605 New California Republic
606 Citizens of Vault City
607 Raiders
608 Mordino Family
609 Slaver's Guild
610 The Slags
611 Kokoweef Mine
612 Morningstar Mine
613 Broken Hills Humans
614 Broken Hills Mutants
615 Wright Family
616 Bishop Family
617 Salvatore Family
618 NCR Rangers
619 Vortis' Slavers
620 Communists
621 Tanker Vagrants
622 Crypts
623 Fools
624 Hub Criminals
625 Crimson Caravans
626 Far Go Traders
627 Water Merchants
628 The Heights Residents
629 Regulators
630 LA Scavengers
631 Gun Runners
632 Followers of the Apocalypse
633 Bounty Hunters
634 Free Traders
635 Guttersnipes
636 FLC
637 Slaves
638 Lara's Gang
639 Children of the Cathedral
640 New Reno Sex Workers
641 Hubologists
642 Cathedral of the Lost
643 New Reno Corsican Brothers
680 Klamath Citizens
681 Den Citizens
682 Modoc Citizens
683 Courtyard Citizens
684 Gecko Ghouls
685 Redding Citizens
686 Broken Hills Ghouls
687 Population of New Reno
688 Necropolis Ghouls
689 Junktown Citizens
690 Hub Citizens
691 LA Citizens

Changing quest statuses was a bit harder nut to crack, but this is how it can be done:
Open the correct map in Mapper and click on the NPC who gives you the quest. Make note of the number after ST_DIALOG_ID.
Open _dialogs.fos and search for the dialog number. This will reveal you the dialog name.
Open the correct dialog file in Dialog Editor and look for the name of the quest and what values it can have.
Open _vars.fos and do a search using the name of the quest in order to find out its ID number.
Now you know the quest ID and the values it can have.
Then use ~myinfo command to see your character ID.
Then use the command "~setvar tid_var master_is_npc master_id slave_id value" without quotes.
I don't know what the other parameters do, but everything seemed to work fine when I set them to 0 like this:
~setvar [quest ID] 0 [character ID] 0 [value]
Title: Re: FOnline SDK - Question
Post by: Lexx on December 27, 2016, 06:37:34 am
Quest ID isn't the only thing a quest has. There can be a truckton more variables assigned to the NPC or the player. It might already be enough just to have one more local variable that prevents a dialogue from appearing twice.
Title: Re: FOnline SDK - Question
Post by: Zinthos on March 18, 2018, 05:02:54 pm
*bump*


How to use the following function?

Code: [Select]
void Action  ( int  action,   int  actionExt,  Item @+  item  )


I am trying to add a function to the GUI, in which you CTRL-Click any item in your inventory and it equips/uses/consumes certain items based on their type. I have been trying with MoveItem but then i found this function and its exactly what i need.

But for some reason it doesn't work at all, i could only make it work with ACTION_DODGE for testing and those which do not have parameters or item defined for them, so i guess the problem lies there.

the idea is simple, i ctrl+click an armor in my inventory and the character takes off the armor and puts on the new one
Code: [Select]
target.Action(ACTION_MOVE_ITEM_SWAP, SLOT_ARMOR, itm);   //this doesnt work
Title: Re: FOnline SDK - Question
Post by: Vice Dice on March 18, 2018, 05:37:20 pm
If I'm not mistaken, void Action is a server side function that has to do something else than you're trying to. If you follow the documentation, this function calls client local binded "critter_action" func with send arguments. I think that if you are working with client side, you might consider using SetChosenActions function instead, it's pretty simple and effective when it comes to scripting player character behaviour.

Like, i.e if you want a player critter to move armor item from armor slot to inventory you might doing it like this:
                   
   
Code: [Select]
uint[] actions = {CHOSEN_MOVE_ITEM, item.Id, 1, SLOT_INV, 0,0};
SetChosenActions(actions);

Try searching through your scripts for CHOSEN_MOVE_ITEM to find all list of possible types of actions and their arguments.

P.S As I get the logic chain, both Critter.Action on server side and SetChosenAction on client side ends up in some code on client side. Critter.Action might possible be used when you want a server to ask a client to do something that server can't. Also for Critter.Action aswell as SetChosenActions you might probably to create your own logic in critter_action that will process recieved arguments as you wish.

P.P.S Looking at my own critter_action, it seems like it helps to perform some "additional" stuff on top of hardcoded thingies that happen when you use those methods.
Title: Re: FOnline SDK - Question
Post by: Zinthos on March 18, 2018, 06:43:05 pm
If I'm not mistaken, void Action is a server side function that has to do something else than you're trying to. If you follow the documentation, this function calls client local binded "critter_action" func with send arguments. I think that if you are working with client side, you might consider using SetChosenActions function instead, it's pretty simple and effective when it comes to scripting player character behaviour.

Like, i.e if you want a player critter to move armor item from armor slot to inventory you might doing it like this:
                   
   
Code: [Select]
uint[] actions = {CHOSEN_MOVE_ITEM, item.Id, 1, SLOT_INV, 0,0};
SetChosenActions(actions);

Try searching through your scripts for CHOSEN_MOVE_ITEM to find all list of possible types of actions and their arguments.

P.S As I get the logic chain, both Critter.Action on server side and SetChosenAction on client side ends up in some code on client side. Critter.Action might possible be used when you want a server to ask a client to do something that server can't. Also for Critter.Action aswell as SetChosenActions you might probably to create your own logic in critter_action that will process recieved arguments as you wish.

P.P.S Looking at my own critter_action, it seems like it helps to perform some "additional" stuff on top of hardcoded thingies that happen when you use those methods.

thanks, managed to make it work that way.

here it is, if anyone is interested

Code: (client_interface.fos, include chosen_actions_h.fos) [Select]
if(GUI_GetActiveScreen() == CLIENT_SCREEN_INVENTORY && GUI_IsKeyPressed(0x1D)) // CTRL click equip/consume/use
{
if(item.GetProtoId()==PID_ADVANCED_BENCH || item.GetProtoId()==PID_WORKBENCH_RAIDERS || item.GetProtoId()==PID_AMMO_FACILITY || item.GetProtoId()==PID_WORKBENCH || item.GetProtoId()==PID_MED_MACHINE ||  item.GetProtoId()==PID_WORKBENCH_PRIMITIVE || item.GetType()==ITEM_TYPE_CONTAINER)
return "";

if(item.CritId > 0 && valid(item) && item.CritId == chosen.Id)
{
if((item.GetType() == ITEM_TYPE_ARMOR) && ((item.GetProtoId() >= 719) && (item.GetProtoId() <= 749)) ) // check for helmet, 723 and 724 *should* probably be excluded
{
Item@ slotItem = chosen.GetItem(0, SLOT_HEAD);
if(valid(slotItem) && (item.Id == slotItem.Id) )    // check if the clicked item is in one of the inventory slots
{
array<uint> action = {CHOSEN_MOVE_ITEM, item.Id, item.GetCount(), SLOT_INV, 0, 0, 0};    // if yes, put it back to the inventory
SetChosenActions(action);
}
else
{
array<uint> action = {CHOSEN_MOVE_ITEM, item.Id, item.GetCount(), SLOT_HEAD, 0, 0, 0};    // if not, put it in an active slot
SetChosenActions(action);
}

}
else if(item.GetType() == ITEM_TYPE_ARMOR)
{
Item@ slotItem = chosen.GetItem(0, SLOT_ARMOR);
if(valid(slotItem) && (item.Id == slotItem.Id) )
{
array<uint> action = {CHOSEN_MOVE_ITEM, item.Id, item.GetCount(), SLOT_INV, 0, 0, 0};
SetChosenActions(action);
}
else
{
array<uint> action = {CHOSEN_MOVE_ITEM, item.Id, item.GetCount(), SLOT_ARMOR, 0, 0, 0};
SetChosenActions(action);
}

}
if(item.GetType() == ITEM_TYPE_WEAPON)
{
Item@ slotItem = chosen.GetItem(0, SLOT_HAND1);
if(valid(slotItem) && (item.Id == slotItem.Id) )
{
array<uint> action = {CHOSEN_MOVE_ITEM, item.Id, item.GetCount(), SLOT_INV, 0, 0, 0};
SetChosenActions(action);
}
else
{
array<uint> action = {CHOSEN_MOVE_ITEM, item.Id, item.GetCount(), SLOT_HAND1, 0, 0, 0};
SetChosenActions(action);
}

}
if(item.GetType() == ITEM_TYPE_MISC || item.GetType() == ITEM_TYPE_AMMO || item.GetType() == ITEM_TYPE_KEY)
{
Item@ slotItem = chosen.GetItem(0, SLOT_HAND2);
if(valid(slotItem) && (item.Id == slotItem.Id) )
{
array<uint> action = {CHOSEN_MOVE_ITEM, item.Id, item.GetCount(), SLOT_INV, 0, 0, 0};
SetChosenActions(action);
}
else
{
array<uint> action = {CHOSEN_MOVE_ITEM, item.Id, item.GetCount(), SLOT_HAND2, 0, 0, 0};
SetChosenActions(action);
}

}
if(item.GetType() == ITEM_TYPE_DRUG)
{
array<uint> action = {CHOSEN_USE_ITEM, item.Id, item.GetProtoId(), TARGET_SELF, chosen.Id, ITEM_MODE_USE, 0};    // Use drugs via ctrl+click
SetChosenActions(action);

}
}
}




i'm curious whether similiar implementation can be applied to Barter dialog or not (https://discordapp.com/assets/53ef346458017da2062aca5c7955946b.svg)
Title: Re: FOnline SDK - Question
Post by: Zinthos on April 12, 2018, 01:31:15 pm
Is it possible to animate a critter in a range of frames?

For example, i choose an animation set, like USE and i specify that only the frames 3,4,5 will play
Title: Re: FOnline SDK - Question
Post by: Voiddweller on December 13, 2018, 09:25:28 pm
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 );
            }
        }
    }
}

While this works unexpectingly (works on all maps for me, regardless of added to the list or not) the AI somewhat lacking when it can't reach you, so you have to wait until it's panic ends with a timeout.
Anyone tried to optimize AI for a turn based mode?