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

Re: FOnline SDK - Question
« Reply #180 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!!!!
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 #181 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?
« Last Edit: October 02, 2011, 02:05:09 pm by Gob »

Offline barter1113

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

Offline Gob

  • The Good
Re: FOnline SDK - Question
« Reply #183 on: October 02, 2011, 10:01:25 pm »

Offline Gob

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

JovankaB

  • Guest
Re: FOnline SDK - Question
« Reply #185 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;
}
}

  • Save the code as for example "jovb.fos" in the Sripts folder.
  • Add "@ server module jovb" line in scripts.cfg file.
  • Restart server, login, get admin access and type for example:
    ~run jovb param 0 200 300
    It should work like ~param 0 200 300 (300% small guns).

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. :)
« Last Edit: October 22, 2011, 05:36:10 pm by JovankaB »

Offline Gob

  • The Good
Re: FOnline SDK - Question
« Reply #186 on: October 22, 2011, 05:46:02 pm »
Thank you much apreciated.

Do I need to compile?
« Last Edit: October 22, 2011, 07:09:24 pm by Gob »

JovankaB

  • Guest
Re: FOnline SDK - Question
« Reply #187 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.
« Last Edit: October 22, 2011, 07:52:28 pm by JovankaB »

Offline Gob

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

JovankaB

  • Guest
Re: FOnline SDK - Question
« Reply #189 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 :'(

Offline Gob

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

JovankaB

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

  • Open file replication.fos in Scripts folder
  • Find line: replTime*=REAL_MINUTE(1);
  • Replace it with: replTime=REAL_SECOND(30);
  • ~run replication or restart server

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).
« Last Edit: October 23, 2011, 05:31:56 pm by JovankaB »

Offline Gob

  • The Good
Re: FOnline SDK - Question
« Reply #192 on: October 23, 2011, 07:23:04 pm »
Thank's this worked ^^

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

Offline Surf

  • Moderator
  • это моё.
Re: FOnline SDK - Question
« Reply #194 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.