fodev.net
FOnline Development => Questions and Answers => Topic started by: Marten Broadcloak on November 17, 2015, 09:21:29 pm
-
Hello everyone,
I'm making this FOnline solo project, and I'm a total noob when it comes to programming. Therefore, my project only requires one bit of script, something that would allow for the player to be teleported to another map/location when he chooses the right dialog line while talking to a NPC. Anyone knows if it is possible and how to do it? (Please keep in mind I'm very, very, very nooby!)
Edit: and a bonus question while I'm at it: I remember there was a file where you basically were able to disable FOV line of sight, turn your mod into singleplayer, etc, anyone remembers which file it is?
-
Hi,
Take a look at this dialog: https://github.com/rotators/fo2238/blob/master/Server/dialogs/event_teleporter.fodlg
There are a few functions in this https://github.com/rotators/fo2238/blob/master/Server/scripts/event_utils.fos#L135 script that can do teleporting via dialog.
About singleplayer, take a look at this http://fodev.net/forum/index.php?topic=29612.0
Another file you probably want to take a look at is config.fos: https://github.com/rotators/fo2238/blob/master/Server/scripts/config.fos
There's no good scripting tutorial in english that doesn't assume knowledge in programming, so you'll at least need some knowledge of C-like languages to be comfortable with AngelScript.
Hope that helps a little.
-
Thank you very much Ghosthack. I will take a thorough look at this.
I agree with your warning, it is obvious that developing a FOnline project without C# or Angelscript knowledge will be tough, but I hope I will encounter few problems and that they will be easy to solve if I ask the community the right questions.
-
I feel I'm going to have a lot of questions in the coming weeks, but I'm keeping them all in this topic to avoid spamming new threads.
Hey Ghosthack, I made some progresses on some issues and finally got to look at the files. For now I've been trying to cleanup the SDK a bit to suit my simple needs, and I didn't get to the dialogs yet.
Config.fos sure raised a lot of questions. The most pressing matter, though, is that of the FOV. Basically, config.fos reads this:
// Look modifiers
__LookChecks = 0; // See Look checks in _defines.fos
SETFLAG(__LookChecks, LOOK_CHECK_DIR); // Nerfe look by directions of look
__LookDir0 = 0; // Nerf 0% of look radius with direct look
__LookDir1 = 20; // Nerf 20% of look radius with front side look
__LookDir2 = 40; // Nerf 40% of look radius with back side look
__LookDir3 = 60; // Nerf 60% of look radius with back look
__LookDir4 = 60; // UNUSED. Nerfe 60% of look radius with back look (Square geometry)
SETFLAG(__LookChecks, LOOK_CHECK_SNEAK_DIR); // Nerfe opponent sneak by directions of look
__LookSneakDir0 = 72; // Nerf %dp% of opponent sneak with direct look
__LookSneakDir1 = 36; // Nerf %dp% of opponent sneak with front side look
__LookSneakDir2 = 12; // Nerf %dp% of opponent sneak with back side look
__LookSneakDir3 = 0; // Nerf %d% of opponent sneak with back look
__LookSneakDir4 = 0; // UNUSED. Nerf 0% of opponent sneak with back look (Square geometry)
From there, of course, I took a look at _defines.fos:
// Look checks
#define LOOK_CHECK_DIR (0x01) // Nerfe look by directions of look
#define LOOK_CHECK_SNEAK_DIR (0x02) // Nerfe opponent sneak by directions of look
#define LOOK_CHECK_SNEAK_WEIGHT (0x04) // Nerfe sneak by current weight
#define LOOK_CHECK_TRACE (0x08) // Tracing for wall aviablility
#define LOOK_CHECK_SCRIPT (0x10) // Allow bool check_look(...) in main.fos, all other defines ignored
#define LOOK_CHECK_ITEM_SCRIPT (0x20) // Allow bool check_trap_look(...) in main.fos, for items with ITEM_TRAP flag
It got me really confused. Like, what is _defines.fos doing? Is it taking action prior to config.fos, or after that? And why is it not just a part of main.fos then? Many questions. Not really important ones. Because, of course, there's the dreaded client_fov.fos. By the content of this file, I reckon you rotators have coded an entire new FOV system from scratch. The problem is, I see no switch to turn it off and I'm starting to wonder: did you erase the old no-FOV way in the process, and should it be coded from scratch again if one decided to disable FOV, or is it the engine's default view? If so, how to turn it back on? Removing the whole Look code from the three files just prevents the server from booting.
P.S. If I die while I'm still young, please tell my family this forum's captcha got me. Seriously, this is suicide material.
P.P.S. Almost forgot. Proof that the development is going smoothly! Or, well, starting smoothly. Right?
(https://i.imgur.com/s938mcX.jpg)
-
If I can ask... what do you do? ;) Is it Oil Rig Enclave base from Fallout 2, isn't it?
-
What FoV model do you want exactly?
No Line of Sight check
or
With line of sight check?
-
If I can ask... what do you do? ;) Is it Oil Rig Enclave base from Fallout 2, isn't it?
Yes, it's a new level for the oil rig. I'm uncomfortable with talking about the project further now, though. It's singleplayer, that's all I can tell.
What FoV model do you want exactly?
No Line of Sight check
or
With line of sight check?
No LOS. Similar to Fallout 1/2.
-
Its not within your copy paste but all you need to do is comment or delete the lines that look like this.
SETFLAG(__LookChecks, LOOK_CHECK_TRACE);
SETFLAG(__LookChecks, LOOK_CHECK_SCRIPT);
SETFLAG(__LookChecks, LOOK_CHECK_ITEM_SCRIPT);
All other further concerns, go on #fodev and contribute to the river of tears.
-
Oh yes, in config.fos! Great, thanks. But the view is still limited, distant NPCs do not appear. I tested a few things and ST_PERCEPTION seem to limit that. Possibly through a script in client_fov.fos, but I haven't be able to determine which one...
-
If you want full vision of everything all day everyday, just set __LookNormal to a really high value.
-
It worked! Thank you very much, devis.
-
Yes, it's a new level for the oil rig. I'm uncomfortable with talking about the project further now, though. It's singleplayer, that's all I can tell.
OMG yes I still wait for fonline singleplayer game. Good luck and I wish you will complete and release game earlier than "soon" :)
-
OMG yes I still wait for fonline singleplayer game. Good luck and I wish you will complete and release game earlier than "soon" :)
Well it won't be done anytime soon, although it's not a huge project. I'm running into several issues. Right now, a minor dialog editor (http://fodev.net/forum/index.php/topic,29657.msg261103.html#msg261103) issue is blocking me but otherwise the biggest problem will be about making the game singleplayer: removing the need to launch the server prior to the client, adding save/load features, cleaning up the FOnline SDK and so on. Ironically, my biggest problems are not related to my project but to the engine itself.
-
Ironically, my biggest problems are not related to my project but to the engine itself.
Welcome to FOnline development :)
-
Those features are all "available" with the SDK.
-
Well, if you know how to do that I think I would not be the only one interested: this thread by JovankaB (http://fodev.net/forum/index.php/topic,29612.0.html) describes the problem but no solution was ever found. :)
-
How did you manage to remove the colon in your link.
-
How did you manage to remove the colon in your link.
"http://http//", I fixed it.
-
Another question, related to maps this time: how to make sure the player relogs in the same location? Right now, when the player disconnects and the server reboots he always spawns on the worldmap, even if the location is set to no_logout (obviously).
-
Check critter_init in main.fos for any TransitToGlobal.
If the location is non-permanent then you'll have to use magic also in critter_init.
-
Just a bit of a follow-up for those who followed my draft of a project.
It has been very frustrating to watch this project semi-freeze, especially since it's so simple as a) 95% of it can be done through the dialog editor and mapper, which I know how to use quite well (there is not even a worldmap), and b) it's quite a small project. The main problem for me is the engine starting point, which is clogged up with things from zillions servers and stuff that rely on older versions of FOnline (e.g. vars in the dialog editors). As it is a solo project, I should probably transition to Fallout 2, but the mapper and dialog editor there are really painful when you're used to FOnline's tools.
-
I'm sorry to hear its too hard for you maybe you should consider