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

Re: FOnline SDK - Question
« Reply #375 on: April 22, 2013, 03:00:38 pm »
I have a question.
Does anyone know how to set random spawn player in encounter map when someone enter inside.
Although they are added many enter points, player still appears only on the same one

Offline wladimiiir

  • Rotator
  • Independent FOnline developer
Re: FOnline SDK - Question
« Reply #376 on: April 23, 2013, 09:27:12 am »
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 ) )
{
    Log( "Default entire not found." );
    return null;
}
fe.StartHexX = startX;
fe.StartHexY = startY;

StartHexY and StartHexY should be the coordinates of place where you will spawn. You can change it like in the following example to have random spawn location:
Code: [Select]
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;

In the example above, you will also have to include entire.fos to the script.
Code: [Select]
#include "entire.fos"
« Last Edit: April 23, 2013, 09:40:20 am by Mike Wall »

Re: FOnline SDK - Question
« Reply #377 on: April 24, 2013, 08:14:05 pm »
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 ) )
...

Works fine, thx man !

Re: FOnline SDK - Question
« Reply #378 on: April 25, 2013, 03:05:24 pm »
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;

Thanks a lot :)

Re: FOnline SDK - Question
« Reply #379 on: April 26, 2013, 01:34:49 am »
I saw that a 'NCR Invasion' exist, how does it works ? What npc can provides me this quest ?

Offline wladimiiir

  • Rotator
  • Independent FOnline developer
Re: FOnline SDK - Question
« Reply #380 on: May 10, 2013, 08:45:07 am »
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.

Offline Gob

  • The Good
Re: FOnline SDK - Question
« Reply #381 on: May 10, 2013, 08:51:43 am »
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.

there are some blockers i think they are the blue ones check the readme

JovankaB

  • Guest
Re: FOnline SDK - Question
« Reply #382 on: May 10, 2013, 09:22:15 am »
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.

no

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

Offline Mayck

  • Rotator
  • ...shhhh...
Re: FOnline SDK - Question
« Reply #383 on: May 10, 2013, 09:45:01 am »
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:
1) either you write your own check_look function so it uses some other flag than ShootThru, however if you would want to do this it would be better to write native extension (put it in .dll). This one is a lot of work.


2) Using an engine glitch, which i am not sure if still works (last time i tried it was 2 years ago). This one is easier, but can be a pain in the ass to mantain (also note it was working only for static scenery and not items):
  • Set ShootThru flag on your bullet-proof-glass scenery
  • Start server and recompile all maps the bullet-proof-glass scenery is on... only maps which don't have their .fomapb equivalent should be recompiled (as far as i remember), or those which were recently edited, so you either need to delete .fomapb counterparts of those maps, or resave them in mapper before you start the server.
  • Shut down Server
  • Unset ShootThru flag on your bullet-proof-glass scenery
  • Start server again.
Downside of this is that (if it still works) you have to repeat these steps everytime you edit any map with bullet proof glass or somehow cause the maps recompilation by other means(like deleting its .fomapb counter-part).
« Last Edit: May 10, 2013, 09:46:50 am by Mayck »

Offline wladimiiir

  • Rotator
  • Independent FOnline developer
Re: FOnline SDK - Question
« Reply #384 on: May 10, 2013, 01:59:36 pm »
Thanks very much. The 2nd solution looks like a hack to me, so I will skip that ;D

I was thinking about doing it as you proposed in 1st solution and I already have my own check_look function, so that should not be a problem to modify. But the problem I see in this is that, if I am not mistaken, FOV lines (Q) will be shown incorrectly as they are not using the custom check_look function to draw themselves (and as they are hardcoded I cannot do much there), or not?

Offline wladimiiir

  • Rotator
  • Independent FOnline developer
Re: FOnline SDK - Question
« Reply #385 on: May 17, 2013, 08:53:51 am »
there are some blockers i think they are the blue ones check the readme
no

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
I am sorry, I somehow missed your answers, so thanks for some tips.

I didn't try the blue blockers, but I might do that later, but I tried check in combat.fos, but the problem with that is that Events (Attack, SeeSmthAttack) before the combat.fos function, so that is insufficient in my case.

I used modified check_look function with some special hex scenery, but I think I will also try Gob's solution to not have possible and unnecessary performance drop while checking it in the function.

Re: FOnline SDK - Question
« Reply #386 on: May 18, 2013, 09:29:01 am »
Hi, I'm new here.
Is it possible to convert Fallout 1 maps to FOnline? Tried googling it but no hits.

Offline Lexx

  • Rotator
  • Mexican Apple Thief
Re: FOnline SDK - Question
« Reply #387 on: May 18, 2013, 10:52:24 am »
Yes, but you will need some older versions of the fonline mapper for this. Then you open the map with the original BIS mapper, save it. Then you open and save it with a modified version of Dimms mapper (not sure if it is in the SDK), then you open and save it with a old version of the fonline mapper, again with one of the next newer versions and again and again... No idea what versions exactly.

That's what we did in 2009, at least. BIS mapper -> modified Dimms mapper -> fonline mapper -> done.

Offline Mayck

  • Rotator
  • ...shhhh...
Re: FOnline SDK - Question
« Reply #388 on: May 18, 2013, 12:46:01 pm »
I remember there used to be a package of Fallout2 maps converted into newer fonline mapper format somewhere on fonline.ru, perhaps someone did the same for Fallout1 maps too.

Offline Wipe

  • Rotator
  • Random is god
Games are meant to be created, not played...