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

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


Re: FOnline SDK - Question
« Reply #421 on: June 17, 2013, 07:11:01 pm »
Have you noticed drop in performance in the latest version of sdk?

Offline Bartosz

  • Rotator
  • There'd better be a killer reason...
Re: FOnline SDK - Question
« Reply #422 on: June 18, 2013, 07:43:23 am »
Have you noticed drop in performance in the latest version of sdk?

What particularily?

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

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

Re: FOnline SDK - Question
« Reply #425 on: June 18, 2013, 04:10:49 pm »
Yes, I run server on this same pc (localhost server).

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


Re: FOnline SDK - Question
« Reply #427 on: June 18, 2013, 06:51:09 pm »
I use default sdk 407 version without any new content.

Offline Berko

  • Tim Tom Ted
    • http://kabefis.deviantart.com/
Re: FOnline SDK - Question
« Reply #428 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 :)
~~~ Ashes of Phoenix project --> http://fonline-aop.net/ ~~~

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


Re: FOnline SDK - Question
« Reply #430 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.
« Last Edit: June 19, 2013, 07:30:37 am by Wind_Drift »
Iguana Pete's sister


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


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


Offline wladimiiir

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

Re: FOnline SDK - Question
« Reply #434 on: June 28, 2013, 02:04:51 pm »
How can I make encounters more frequent?