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

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

Offline noizeCode

  • I <3 teh codez
Re: FOnline SDK - Question
« Reply #361 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
oh no.. my Mentats are gone....

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

Offline noizeCode

  • I <3 teh codez
Re: FOnline SDK - Question
« Reply #363 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

oh no.. my Mentats are gone....

Re: FOnline SDK - Question
« Reply #364 on: April 10, 2013, 11:34:50 pm »
how can I make the sierra army depot turrets stronger so there attacks deal more damage?

Re: FOnline SDK - Question
« Reply #365 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.
Iguana Pete's sister


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

« Last Edit: April 15, 2013, 08:09:36 am by Demenise »

Re: FOnline SDK - Question
« Reply #367 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?
« Last Edit: April 15, 2013, 08:08:13 am by Demenise »

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

Offline Wipe

  • Rotator
  • Random is god
Re: FOnline SDK - Question
« Reply #369 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
Games are meant to be created, not played...

Re: FOnline SDK - Question
« Reply #370 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?
Iguana Pete's sister


Offline Wipe

  • Rotator
  • Random is god
Re: FOnline SDK - Question
« Reply #371 on: April 16, 2013, 12:30:04 pm »
Without going into too much details: yea, that will do the trick.
Games are meant to be created, not played...

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

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

Offline wladimiiir

  • Rotator
  • Independent FOnline developer
Re: FOnline SDK - Question
« Reply #374 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;