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

Re: FOnline SDK - Question
« Reply #135 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?
« Last Edit: June 15, 2011, 12:03:38 pm by Nick.is.Back »

Offline Mayck

  • Rotator
  • ...shhhh...
Re: FOnline SDK - Question
« Reply #136 on: June 15, 2011, 12:17:33 pm »
Go to Redding npcs there are mortal  ;D

Offline Gob

  • The Good
Re: FOnline SDK - Question
« Reply #137 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.
« Last Edit: June 15, 2011, 02:54:08 pm by Gob »

Offline barter1113

  • New Vegas fanatic =)
Re: FOnline SDK - Question
« Reply #138 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"?

Offline Lexx

  • Rotator
  • Mexican Apple Thief
Re: FOnline SDK - Question
« Reply #139 on: July 18, 2011, 11:14:35 am »
70 is the map id. Most likely for primal_tribe.

Re: FOnline SDK - Question
« Reply #140 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?
Owner of FOnline 2258! A true Fallout inspired adventure!
http://bit.ly/3syLeTp
http://www.fonline2258.com

Re: FOnline SDK - Question
« Reply #141 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

Re: FOnline SDK - Question
« Reply #142 on: August 03, 2011, 11:32:00 pm »
sweet, we should try to get as many q/a's as possible in this thread
Owner of FOnline 2258! A true Fallout inspired adventure!
http://bit.ly/3syLeTp
http://www.fonline2258.com

Re: FOnline SDK - Question
« Reply #143 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.

-----

Owner of FOnline 2258! A true Fallout inspired adventure!
http://bit.ly/3syLeTp
http://www.fonline2258.com

Re: FOnline SDK - Question
« Reply #144 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?
Owner of FOnline 2258! A true Fallout inspired adventure!
http://bit.ly/3syLeTp
http://www.fonline2258.com

Offline Gob

  • The Good
Re: FOnline SDK - Question
« Reply #145 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.

Offline runboy93

  • 'Insanity'
    • MyAnimelist Profile
Re: FOnline SDK - Question
« Reply #146 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.

Offline Gob

  • The Good
Re: FOnline SDK - Question
« Reply #147 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

Offline barter1113

  • New Vegas fanatic =)
Re: FOnline SDK - Question
« Reply #148 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.

Uploaded with ImageShack.us

Offline jan0s1k

  • If it bleeds we can kill it...
    • Chosen Soldiers
Re: FOnline SDK - Question
« Reply #149 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.

Uploaded with ImageShack.us

After this 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  ::)
« Last Edit: August 07, 2011, 02:37:14 pm by jan0s1k »