# Keys for accesses
# Aviable four access mode: client (default on login), tester, moder, admin
Access_client=000000 00000000
Access_tester=
Access_moder=
Access_admin=
Access_admin=blabla
restart server.~getaccess admin blabla
~myinfoyou should have access level "administrator".
~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.
Where you found these IDs on health, skills and etc ?
Also I have another question . . . how to spawn items? I need to find all commands but don't know where :C.
and list of item PIDs can be found in _itempid.h
Do you can send me a admin command's for this sdk? Sorry for my anglish.
(...) 5. movecrit <id> <hx> <hy> (...)
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))
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
Thanks for answer.So what?
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.
_defines.fos
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
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.
First of all (don't get me wrong) one quote (from JovankaB)... 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/???
_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.
_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?
:/
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
Ok.my server is done,now how can people join my server?lolz.. Are you Vedaras or Steve_Zizouza?
How can I turn off bounty hunters in my server? I can't find anything about it in scripts.
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 doneSDK is from TLA, not 2238. I have a question. Are 3d models van buren in sdk?
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....
How do i change the replication time?
if(cr.IsPlayer()) replTime=3; // 3 minutes
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?
How can i make a server status like the one on the forum?
How can i make a server status like the one on the forum?
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.
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 ;)
http://fodev.net/forum/index.php?topic=2351.msg19771#msg19771You speedy bastard!
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
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 :)
<?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" );
?>
wtf is that?!? it look more complicated than c++.anyway thanks both of you for fast reply.
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 -.-)
<?php
$host = "94.23.237.127"; // Server IP address
$port = "2238"; // Server port
$socket = socket_create(AF_INET, SOCK_STREAM, 0) 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, $buf, 16, MSG_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 = imagecreate( 200, 50 ); // create 200x50px image
$bg = imagecolorallocate($img, 255, 255, 255); // fill background with RGB(255,255,255) (white)
$black = imagecolorallocate($img, 0, 0, 0 ); // allocate RGB(0,0,0) (black) for strings
imagestring($img, 5, 0, 0, "Online: $online", $black ); // Write online count onto image
imagestring($img, 5, 0, 20, "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" );
?>
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 ;)wow ;p I can do this with lower requirement (gui takes space too!):
DOWNLOAD ME (http://ompldr.org/iNnVpMA)
cmd
ping fonline2238.net
echo Yea, I'm boss
save as status.bat and then run it ;p
[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.
e_mountain7
map from locations.cfgOpen 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
Hi, how can I get value of Access Level of CritterCl?
GetAccess() function does not work.
GetAccess() is member of Critter, not CritterCl.I thought that CritterCL inherits from Critter... my bad. Thanks.
what is this fallout SDK u are talking about im wondering what it is
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.
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.
OOO and how do i give myself a skin?ni
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)
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
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.are you sure that you meanCode: [Select]if(message=="~xy")
{
uint16 hexX=0, hexY=0;
GetMonitorHex(MouseX, MouseY, hexX, hexY);
Message("Hex: "+hexX+" "+hexY);
return false;
}
Message("Hex: "+hexX+" "+hexY);
? (because the " )
are you sure that you meanDon't know what's wrong with that line (looks fine to me)Code: [Select]Message("Hex: "+hexX+" "+hexY);
? (because the " )
Don't know what's wrong with that line (looks fine to me)then i looked wrong, shit happens
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.
Where can i get that draw text??
... 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
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?
Alt click to give stuff to them, shift click on weapon to arm them with weapon.Nothing Happens! Just start talking to them
Nothing Happens! Just start talking to them
And yes!I am loged
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();
}
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??
[Area 17]
name = Primal Tribe
size = 6
map_0 = primal_tribe* 70
entrance = 1
visible = 1
auto_garbage = 0
What is "70"?
How do you customize random encounters? Lets say I only want to encounter Ghouls and Ghouls VS X, how do you do that?
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.
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)
[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!
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?
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 :)
GmapTilesPic = WRLDMP%02d.FRM # Íŕçâŕíčĺ čçîáđŕćĺíčé ăëîáŕëüíîé ęŕđňű
GmapTilesX = 4 # Ęîëč÷ĺńňâî čçîáđŕćĺíčé â řčđčíó
GmapTilesY = 5 # Ęîëč÷ĺńňâî čçîáđŕćĺíčé â âűńîňó
how do you teleport a player through dialog? ex. say yes to be moved to a specific map.~runscript debug tele ID MAP 0
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.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.
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
use ~regenmap
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?
#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;
}
}
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" );
}
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.
/// Client specific definitions
#ifdef __CLIENT
__RoofAlpha = 255;
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.
Mapper.exe -ScreenWidth 1024 -ScreenHeight 768
Feel free to create better mapping application ;)
I'm not such a good programmer.
The mapper is a very convenient tool after you just get used to it,
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.
The outcome of your work is the thing that counts, not the tools you use, my master.
The real problem is that there is almost no tutorials for mapper or good how-to-make-a-map guides.
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.
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.
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?
SDK mapper is quite time efficient if you got used to it.
Ever heard about opinions?
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? ::)
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?
[...]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.
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.
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.
Seems a bit complicated... Is it the same for adding new scenery?
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?
Stop server button?
Stop server button?I believe she meant this one
3.how do i make enemies i want hostile.Try this:
NMA topic but not tutorial for it. http://www.nma-fallout.com/forum/viewtopic.php?t=60208
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!
There is no skin command.
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
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...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.
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
That's about what I figured. I'll see what I can't cook up. Thanks.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.
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...
Modifying a code in a file named 'npc_planes.fos'.Ah thanks i got it to work out now they run
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 npcGlobally: __TalkDistance, see config.fos; per NPC: Critter param ST_TALK_DISTANCE, see _defines.fos
How do I make it so I cant see npcs through walls?comment this in config.fos
__LookChecks |= LOOK_CHECK_DIR;
P.S __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 ;DIs there a way to disable fog on the world map?
void SetFog (uint16 zoneX, uint16 zoneY, int fog)
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 );
bool SetKnownLoc (bool byId, uint locNum)
cr.SetKnownLoc( false, LOCATION_BrokenHills );
cr.SetKnownLoc( false, LOCATION_NewReno );
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 wayI am very thankful of this
Is there a way to disable fog on the world map?
I still want help on this grid problemkay, I'll try to explain it correctly on steps
http://tinypic.com/view.php?pic=2n0kinb&s=6
and if adding more zones solves this how do i do that?
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 __GlobalMapZoneLength = 50; // How much pixels in 1 zone, maxmim is 500
and then set this values__GlobalMapWidth = 48; // Maximum 100, just an example
__GlobalMapHeight = 76; // Maximum 100, just an example
same values u need to set in worldmap.fos#define ZONE_COUNT_X (48)
#define ZONE_COUNT_Y (76)
#define ZONE_LENGTH (50)
3)Mask...but u know it from previous messageI'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
case ACTION_PICK_ITEM:
if( cr.IsLife() && valid( proto ) )
{
cr.ClearAnim();
cr.Animate( 0, proto.GroundLevel ? ANIM2_PICKUP : ANIM2_USE );
}
break;
cr.Animate( 0, proto.GroundLevel ? ANIM2_PICKUP : ANIM2_USE );
toif (proto.Type < 8 ) cr.Animate( 0, ANIM2_PICKUP );
else cr.Animate( 0, proto.GroundLevel ? ANIM2_PICKUP : ANIM2_USE );
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?Who change animation? It was always like this in sdk.
if( target.ChangeCrType( param1 ))
target.StatBase[ST_BASE_CRTYPE] = param1;
Who change animation? It was always like this in sdk.
I just get a bunch of errors i have no idea what to do
~runscript debug body 1 21 0
When I restart the server it doesn't save the skin is there a way to save it?
yeah I need help I don't really know what to do.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.
int crType = ( player.Stat[ ST_GENDER ] == GENDER_MALE ? CRTYPE_male_type : CRTYPE_feramle_type );
player.ChangeCrType( crType );
player.StatBase[ ST_BASE_CRTYPE ] = crType;
// 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 )
You click it and hit "del".
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.
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
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).
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.
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
How do you merge it with current 382 revision?
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.
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.
__GlobalMapWidth = 28; // Maximum 100
__GlobalMapHeight = 30; // Maximum 100
__GlobalMapZoneLength = 50; // Maximum 500
GmapTilesPic = WRLDMP%02d.FRM
GmapTilesX = 4
GmapTilesY = 5
I have a problem with timeouts and respawn time
i have change it but the timeout wont change neither will the replication time
#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
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.
How do I add new 3D models to my sdk?
I miss cargo feature :(What is this cargo feature you speak of?
loc.Color = COLOR_CHANGE_ALPHA(COLOR_RGB(0,0,0xC8), 70);
How do I remove the flower I get every time I respawn?
or change it to another object?
_CritAddItem( cr, PID_FLOWER, 1 );
How do i remove hell so i can just respawn at the nearest replication?
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
}
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
[Area 1]
name = Desert
size = 6
map_0 = e_desert1 1
entrance = $0 0
visible = 1
auto_garbage = 1
thank you do you also know how to change how frequent the encounters on the world map are?
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.
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 );
}
cr.SetFog( zoneX, zoneY, FOG_FULL );
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
[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
// 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;
}
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;
}
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.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
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
How is it possible to make NPC's barter ? I tried writing this on a NPC properties with the mapper:Make sure that your NPC has MODE_NO_BARTER set to 0 (otherwise the message "You cannot trade with this person." will be shown).
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 ?
npc.ModeBase[MODE_NO_BARTER] = 0;
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;
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;
#include "entire.fos"
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 ) )
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;
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.
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.
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:
there are some blockers i think they are the blue ones check the readme
noI am sorry, I somehow missed your answers, so thanks for some tips.
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
Thank you.You mean changing the WMs ingame?
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?
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.
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.
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.
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.
Whatever happened to FOnline: 2238? Did they also release an SDK or is that just for TLA?
Sound is made when engine calls reserved critter_action function (ACTION_USE_WEAPON). Just make scripts skip PlaySound() when specific weapon is used.
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?
This might end up being a ridiculously easy answer, but what is the proper way to wipe the server?
And also specifically when is wiping the server needed?
__NoAnswerShuffle = false;
Set it to true and you are done. :)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.I advice to see (and understand) all variables that can be configured in config.fos, so you don't any more sleepless night. ;)
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. ;)
Have you noticed drop in performance in the latest version of sdk?
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.
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.
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 :)
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?
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;
}
}
}
}
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.
How can I make encounters more frequent?In worldmap_init.fos you can find lines of codes like this one:
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 armor1. How do you stop your server? Is it saved before you exit it?
how do I stop this from happening or at least what causes this to happen?
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?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? ???
How make turnbase in towns? (in BH, redding etc.)
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 );
}
}
}
}
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/).
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.
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 );
}
}
}
}
Is there any commands that would allow me to reset/redo quests?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:
If so where can I find the quest ID's?
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.
void Action ( int action, int actionExt, Item @+ item )
target.Action(ACTION_MOVE_ITEM_SWAP, SLOT_ARMOR, itm); //this doesnt work
uint[] actions = {CHOSEN_MOVE_ITEM, item.Id, 1, SLOT_INV, 0,0};
SetChosenActions(actions);
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.
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);
}
}
}
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 );
}
}
}
}