Page 1 of 8

[RELz] Fallout Script Extender (FOSE) v1

PostPosted: Mon Aug 17, 2009 8:48 am
by Kerri Lee
-- Previous Threads --
http://www.gamesas.com/bgsforums/index.php?showtopic=915278 http://www.gamesas.com/bgsforums/index.php?showtopic=924371 http://www.gamesas.com/bgsforums/index.php?showtopic=928358 http://www.gamesas.com/bgsforums/index.php?showtopic=932720 http://www.gamesas.com/bgsforums/index.php?showtopic=935840 http://www.gamesas.com/bgsforums/index.php?showtopic=940548 http://www.gamesas.com/bgsforums/index.php?showtopic=945361 http://www.gamesas.com/bgsforums/index.php?showtopic=951381

Fallout Script Extender v1
by Ian Patterson (ianpatt), Stephen Abel (behippo) and Paul Connelly (scruggsywuggsy the ferret)

Additional contributions from: Timeslip, ElminsterEU

If you are using version of Fallout newer than 1.1.0.35 (or the loader is telling you that you have an unknown version of Fallout), you will need to download the beta version posted below.

Current beta: v1.1 beta 5
Download: http://fose.silverlock.org/beta/fose_v1_1_beta5.zip

Stable version: v1
Download: http://fose.silverlock.org/download/fose_v1.zip
Documentation: http://fose.silverlock.org/fose_command_doc.html

From the beta readme:
The Fallout Script Extender, or FOSE for short, is a modder's resource that expands the scripting capabilities of Fallout 3. It does so without modifying the Fallout3.exe or the G.E.C.K. files on disk, so there are no permanent side effects.

Compatibility:

FOSE supports these versions of Fallout 3 (from either a retail DVD or Steam):
- 1.0.0.15
- 1.1.0.35
- 1.4.0.6 (original release)
- 1.4.0.6 (alternate release, found on steam and some European patches)

FOSE is compatible with the 1.1.0.36 G.E.C.K.

Incompatibilities:
* FOSE is not compatible with the original, unpatched DVD or Steam version. Either version patched to 1.0.0.15 or 1.4.0.6 will work.
* FOSE is not compatible with the Direct2Drive (D2D) or the Russian version of Fallout 3 protected by StarForce. FOSE will never be compatible with these versions, as they are encrypted and it would be illegal to break the encryption.
* FOSE is currently incompatible with Windows Live, so when running via fose_loader.exe, Live will be disabled. Live functions as an anti-cheat mechanism, so it disables itself if it detects any in-memory modifications to the executable, despite the fact that Fallout has no multiplayer component. Since Live cannot tell the difference between the modifications we make and the modifications a cheating program would make, we will probably never be directly compatible. To download DLC and updates, simply launch Fallout normally. Live stores DLC and save files in a separate folder when active, so some things may need to be moved around - see the official Fallout forums for more information.

This initial release adds 189 new scripting functions including:
- basic input functions based on DX scancodes
- basic form list functions
- debugging console functions
- various weapon and inventory item Get and Set functions
- script versions of several console functions
- Looping functions (Label, Goto)
- GetCrosshairRef
- get and set game setting and INI functions
- loaded mod informtion functions
- reference walking functions
- Basic UI Functions (GetUIFloat, SetUIFloat, SetUIString)
- basic math and bit flag functions
- GetGameRestarted, GetGameLoaded
- temporary base form cloning functions

This official release will be supported going forward and you may now release mods based on FOSE. Thanks to all of our fabulous beta testers!
Mods which were built against the earlier beta should be recompiled using the official release.
v1.1 beta 2 should resolve issues with Label/Goto not working on some machines.
v1.1 beta 5 should resolve issues with SetUIFloat crashing on 1.4.6/1.4.6b runtimes.

[RELz] Fallout Script Extender (FOSE) v1

PostPosted: Sun Aug 16, 2009 6:34 pm
by Steven Nicholson
I hate to sound pushy, but will FOSE support the following in the next version
Can I add something to requests (assuming it isn't available already)

SetWeaponFireRate or similar? you seem to have pretty much everything except that when dealing with "weapons"

there is a GetWeaponFireRate...so hopefully this is possible ^_^

EDIT: also...I know its possible to change the max ammo in a clip...but is it possible to change the current ammo in a clip?
Changing the max ammo only affects the gun upon reload so being able to change current ammo would be a big help here.

Also...either I'm using the command wrong, or http://fose.silverlock.org/fose_command_doc.html#SetWeaponAmmo isn't working correctly. I change ammo from 10mm to .556 but the gun continues to use 10mm

Thanks again for all your hard work and this amazing tool,
TheDamned

[RELz] Fallout Script Extender (FOSE) v1

PostPosted: Sun Aug 16, 2009 10:48 pm
by Peter P Canning
I hate to sound pushy, but will FOSE support the following in the next version

Can I add something to requests (assuming it isn't available already)

SetWeaponFireRate or similar? you seem to have pretty much everything except that.

there is a GetWeaponFireRate...so hopefully this is possible ^_^

EDIT: also...I know its possible to change the max ammo in a clip...but is it possible to change the current ammo in a clip?


I am not sure whether a SetWeaponFireRate would work. If I remember correctly, SetWeaponFireRate seems to be calculated from other fields and is not settable directly in the GECK. I am not sure whether changing it directly would have any effect. But we can certainly look at it for v2.

We don't know how to change the current ammo yet. We haven't found the place where it is stored. We've had several requests for it, but we've not had much luck finding it yet.
Also...either I'm using the command wrong, or http://fose.silverlock.org/fose_command_doc.html#SetWeaponAmmo isn't working correctly. I change ammo from 10mm to .556 but the gun continues to use 10mm

Thanks again for all your hard work and this amazing tool,
TheDamned

Have you caused the weapon to reload yet? Several threads ago we discovered that until the current weapon's clip runs out Fallout will continue to use the old ammo unless a reload happens. Wherever the current ammo count is stored is also where the old ammo itself is stored. Until the weapon is reloaded it will continue to use the old ammo. We've suggested that people force a reload by changing the clip size for the weapon and using TapControl 7. When we locate the current clip count and current ammo info (which may be stored in the UI somewhere) we'll be able to help more. We'll probably include a Reload function which will force a reload using the current ammo and would work even if the clip was full.

[RELz] Fallout Script Extender (FOSE) v1

PostPosted: Mon Aug 17, 2009 8:27 am
by darnell waddington
I am not sure whether a SetWeaponFireRate would work. If I remember correctly, SetWeaponFireRate seems to be calculated from other fields and is not settable directly in the GECK. I am not sure whether changing it directly would have any effect. But we can certainly look at it for v2.

We don't know how to change the current ammo yet. We haven't found the place where it is stored. We've had several requests for it, but we've not had much luck finding it yet.

Have you caused the weapon to reload yet? Several threads ago we discovered that until the current weapon's clip runs out Fallout will continue to use the old ammo unless a reload happens. Wherever the current ammo count is stored is also where the old ammo itself is stored. Until the weapon is reloaded it will continue to use the old ammo. We've suggested that people force a reload by changing the clip size for the weapon and using TapControl 7. When we locate the current clip count and current ammo info (which may be stored in the UI somewhere) we'll be able to help more. We'll probably include a Reload function which will force a reload using the current ammo and would work even if the clip was full.

When I say Fire Rate I mean the value Highlighted in

As for forcing a reload...not sure if that will be an option (at least for what I am working on) thanks for the tip/info though I'm sure I'll find it useful in the near future ^_^...For a future "force reload" command would it be possible to force a reload without playing the animation?

Thanks,
TheDamned

[RELz] Fallout Script Extender (FOSE) v1

PostPosted: Mon Aug 17, 2009 2:12 am
by saharen beauty
When I say Fire Rate I mean the value Highlighted in

Ah - that one we can change. I thought you meant the Attack Shots/Sec field on the Art and Sound tab which is calculated. I can easily add a SetWeaponFireRate for v2.

[RELz] Fallout Script Extender (FOSE) v1

PostPosted: Mon Aug 17, 2009 12:20 am
by Marine Arrègle
Be sure to thank Ian for his quick work looking into 1.4.0.6.

:thumbsup:

[RELz] Fallout Script Extender (FOSE) v1

PostPosted: Sun Aug 16, 2009 10:11 pm
by meghan lock
Ah - that one we can change. I thought you meant the Attack Shots/Sec field on the Art and Sound tab which is calculated. I can easily add a SetWeaponFireRate for v2.

yay! you deserve :hugs: for that ^_^

[RELz] Fallout Script Extender (FOSE) v1

PostPosted: Sun Aug 16, 2009 11:23 pm
by Bryanna Vacchiano
Would it be possible to implement a function along the lines of something like:

ScriptName.AddScriptSegmant goto:SegVar1

and then have this on another script to be extracted from:
Scn BlaaBlaaBlaaString SegVar1;???---:SegVar1Player.SetAV Health 2;SomeRandomFunctionsPlayer.GetAV AP;more stuff/SegVar1--End


This way it would be possible to create scripts much longer than 750 lines (which often greatly restricts things and causes issues when shortening it). Aswell as this you could easily have one mod listed as an ESM (useful for things such as schematic/workbench mods) which simply has a script along the lines of:

Scn ScriptNameBegin OnActivateBlueNukeSchematicScript.AddScriptSegmant goto:SegVar1cal50AmmoSchematicScript.AddScriptSegmant goto:SegVar1flamethrowerSchematicScript.AddScriptSegmant goto:SegVar1SpitNadeSchematicScript.AddScriptSegmant goto:SegVar1SniperSchematicScript.AddScriptSegmant goto:SegVar1


Allowing a modder to simply create a 750 line script consisting of only these in it, having modders reserve a line (there's 750 so it'll be a while before space becomes a problem, even then a simple edit can remove one and add another) creating a very simple workaround to things like schematic issues overriding vanilla bench scripts, etc.

Just an idea and I have no idea how possible/easy/impossible/insanely hard this would be.

Note: You could use something along the lines of Pluggy to store strings and then adding it like that but again, no idea how difficult it would be to do something like this.

[RELz] Fallout Script Extender (FOSE) v1

PostPosted: Sun Aug 16, 2009 11:15 pm
by daniel royle
creating a very simple workaround to things like schematic issues overriding vanilla bench scripts, etc.

Perhaps OT, but the workbench issue has a great work-around mod: http://www.gamesas.com/bgsforums/index.php?showtopic=961589.

[RELz] Fallout Script Extender (FOSE) v1

PostPosted: Mon Aug 17, 2009 1:25 am
by Queen of Spades
Is there any way I can use the russian version of the game patched to 1.4, with FOSE?

[RELz] Fallout Script Extender (FOSE) v1

PostPosted: Mon Aug 17, 2009 1:13 am
by Ezekiel Macallister
Is there any way I can use the russian version of the game patched to 1.4, with FOSE?

The Russian Fallout3.exe has built-in copyright protection which we cannot (and will not) break as it would be illegal. Getting a legal copy of the English version of Fallout and applying the English patch ought to produce an exe you could use with the Russian esm, I believe. But I am not sure whether you can get a hold of an English Fallout.exe in Russia.

[RELz] Fallout Script Extender (FOSE) v1

PostPosted: Mon Aug 17, 2009 2:17 am
by Johanna Van Drunick
behippo check out this post:

http://www.gamesas.com/bgsforums/index.php?s=&showtopic=964426&view=findpost&p=13931426

Anything you can think of?
This is the Steam build 1.0.0.12 (the original pre-patch version of Fallout)

[RELz] Fallout Script Extender (FOSE) v1

PostPosted: Sun Aug 16, 2009 11:56 pm
by Farrah Barry
Perhaps OT, but the workbench issue has a great work-around mod: http://www.gamesas.com/bgsforums/index.php?showtopic=961589.

Yes I know but that was only an example. I have been trying to make several mods in Oblivion only to require a function like I said before. Also it uses actors as replacements which makes it confusing for new modders to make new schematics for it. So yea, any chance Behippo that something like this could be done?

[RELz] Fallout Script Extender (FOSE) v1

PostPosted: Sun Aug 16, 2009 9:49 pm
by Devils Cheek
When I say Fire Rate I mean the value Highlighted in

As for forcing a reload...not sure if that will be an option (at least for what I am working on) thanks for the tip/info though I'm sure I'll find it useful in the near future ^_^...For a future "force reload" command would it be possible to force a reload without playing the animation?

Thanks,
TheDamned


That value is only used if the 'Automatic' flag is checked. The factor which determine the weapon's Rate of Fire reside in the Art and Sound tab. There are two entries in the Animation sub section. The first, "Multiplier", is a number which is multiplied by the Jam & Reload time set by the Reload animation that is selected at the bottom under "Reload Anim". The second, "Attack Multiplier", is a number which is multiplied by the Attack animation time set by the Attack animation that is selected at the bottom under "Attack Anim". As for calculating the results of it, just do a little math with what the GECK says the numbers are and you'll have the settings for each of them. When the Automatic flag is checked, these multipliers are still used, but the Fire Rate is multiplied by the result of the Attack Multiplier's equation.

And that's how attack animations work.

[RELz] Fallout Script Extender (FOSE) v1

PostPosted: Mon Aug 17, 2009 7:54 am
by Dina Boudreau
Thank you for retrograding to support V1.0.015. I'm really enjoying having a fully functional VATS and having FOSE at the same time.

[RELz] Fallout Script Extender (FOSE) v1

PostPosted: Mon Aug 17, 2009 12:30 am
by K J S
Thank you for retrograding to support V1.0.015. I'm really enjoying having a fully functional VATS and having FOSE at the same time.
:celebration:

[RELz] Fallout Script Extender (FOSE) v1

PostPosted: Mon Aug 17, 2009 4:16 am
by Yama Pi
Hi guys, first off I think it's neccessary that I pay you BIG respects for your work. Without FOSE, half of our mods wouldn't be possible, and especially not the one I'm working on currently. Thank you a lot!

The reason I'm posting here is nothing severe, just something that confused me. It's about the documentation actually. While generally very well written, I happened on a little something today. The functions GetWeaponResistType and SetWeaponResistTime take as a parameter an integer, using the code ResistValue. However, when I click on it, I'm brought to the code list for ActorValues, and the ResistValue list seems missing. Now either these two are the same (then maybe pointing it out would be a good thing, because it's rather confusing the way it is) or something went a-missing in the docs. Could you clear this up for me?

[RELz] Fallout Script Extender (FOSE) v1

PostPosted: Mon Aug 17, 2009 6:10 am
by Mrs Pooh
I still don't have FO3 yet, but I thought I'd see if I could port my recent FPS capper OBSE plugin to run on FOSE instead anyway, since I've heard that fallout has some stuttering problems. I downloaded 1.1 beta 2:

Has anyone written a FOSE plugin yet? Does FOSE support plugins atm? I see an API, but I'm not sure if it's intended to be used yet or not. Could you guys add a sample plugin project for FOSE like there is for OBSE please?

I had a bit of trouble with the project file for FOSE there... possibly I did something very wrong, I feel very clumsy around damned project files. I got it working, but I had to add everything in src\common, everything in src\fose_common, winmm.lib, and I had to write code for Bitstring::Dispose.

BTW, the Bitstring code there looks bugged... the 2nd constructor is calling Alloc without initializing members, and Alloc is calling Dispose, which then has no way of telling whether or not the pointer is initialized.

edit: I'm attempting to convert the obse generic plugin project to an fose plugin project... dunno if I'm getting anywhere or not though

[RELz] Fallout Script Extender (FOSE) v1

PostPosted: Mon Aug 17, 2009 1:33 am
by Matt Terry
That value is only used if the 'Automatic' flag is checked. The factor which determine the weapon's Rate of Fire reside in the Art and Sound tab. There are two entries in the Animation sub section. The first, "Multiplier", is a number which is multiplied by the Jam & Reload time set by the Reload animation that is selected at the bottom under "Reload Anim". The second, "Attack Multiplier", is a number which is multiplied by the Attack animation time set by the Attack animation that is selected at the bottom under "Attack Anim". As for calculating the results of it, just do a little math with what the GECK says the numbers are and you'll have the settings for each of them. When the Automatic flag is checked, these multipliers are still used, but the Fire Rate is multiplied by the result of the Attack Multiplier's equation.

And that's how attack animations work.


Yes but this could be useful in having Automatic Rifles be able to alternate between.
"Slow accurate" and "Fast inaccurate".

Yeah I been playing around with animation multipliers to try get a slower firing weapon than 1 but the animations seem to have long periods of no animation but at the start and end meaning at the end of the animation you have to weight still to do something...
Not to mention its asthough your moving in slow motion...
A way to actually change the speed of the weapon would be really useful.

I have only just really began to understand the work of FOSE and I think I may deffinately have to read through alot of your threads.... :)

[RELz] Fallout Script Extender (FOSE) v1

PostPosted: Sun Aug 16, 2009 6:01 pm
by Kat Lehmann
Yes but this could be useful in having Automatic Rifles be able to alternate between.
"Slow accurate" and "Fast inaccurate".

Yeah I been playing around with animation multipliers to try get a slower firing weapon than 1 but the animations seem to have long periods of no animation but at the start and end meaning at the end of the animation you have to weight still to do something...
Not to mention its asthough your moving in slow motion...
A way to actually change the speed of the weapon would be really useful.

I have only just really began to understand the work of FOSE and I think I may deffinately have to read through alot of your threads.... :)

Changing animations as a means of controlling Fire Rate is a poor method in my opinion and , as you seem to have figured out, can be quite buggy.

TheDamned

EDIT: sorry for going off-topic here... :angel:

[RELz] Fallout Script Extender (FOSE) v1

PostPosted: Sun Aug 16, 2009 7:34 pm
by danni Marchant
Changing animations as a means of controlling Fire Rate is a poor method in my opinion and , as you seem to have figured out, can be quite buggy.

TheDamned

EDIT: sorry for going off-topic here... :angel:


Indeed it is a terrible method, hence why I said another method would be good. :)
For some animations you can 'just' get away with it but I would rather have reload between every single shot than a slowed down animation speed...
(I havent implemented it into anything just messed around with it.)

[RELz] Fallout Script Extender (FOSE) v1

PostPosted: Mon Aug 17, 2009 9:51 am
by Len swann
I still don't have FO3 yet, but I thought I'd see if I could port my recent FPS capper OBSE plugin to run on FOSE instead anyway, since I've heard that fallout has some stuttering problems. I downloaded 1.1 beta 2:

Has anyone written a FOSE plugin yet? Does FOSE support plugins atm? I see an API, but I'm not sure if it's intended to be used yet or not. Could you guys add a sample plugin project for FOSE like there is for OBSE please?

I had a bit of trouble with the project file for FOSE there... possibly I did something very wrong, I feel very clumsy around damned project files. I got it working, but I had to add everything in src\common, everything in src\fose_common, winmm.lib, and I had to write code for Bitstring::Dispose.

BTW, the Bitstring code there looks bugged... the 2nd constructor is calling Alloc without initializing members, and Alloc is calling Dispose, which then has no way of telling whether or not the pointer is initialized.

Ported the plugin API code a while back and implemented the necessary serialization hooks but it is all disabled in the current build. It has not been properly beta-tested yet as we wanted to focus on getting basic functionality tested and released for v1. v2 beta should include plugin support; as with OBSE we'll include an example project as a base for plugin developers.

It's possible we made a mistake in packaging up the source code for release; will look into it.
Hi guys, first off I think it's neccessary that I pay you BIG respects for your work. Without FOSE, half of our mods wouldn't be possible, and especially not the one I'm working on currently. Thank you a lot!

The reason I'm posting here is nothing severe, just something that confused me. It's about the documentation actually. While generally very well written, I happened on a little something today. The functions GetWeaponResistType and SetWeaponResistTime take as a parameter an integer, using the code ResistValue. However, when I click on it, I'm brought to the code list for ActorValues, and the ResistValue list seems missing. Now either these two are the same (then maybe pointing it out would be a good thing, because it's rather confusing the way it is) or something went a-missing in the docs. Could you clear this up for me?

They are one and the same, sorry for the confusion. We're trying to streamline the docs a bit for FOSE both for the sake of brevity and for our own convenience; we found with OBSE that documentation consumed a lot of time that could have been better spent on development. We'll try to make them a bit more user-friendly in places.

[RELz] Fallout Script Extender (FOSE) v1

PostPosted: Sun Aug 16, 2009 10:50 pm
by victoria johnstone
we found with OBSE that documentation consumed a lot of time that could have been better spent on development.


Yes, Documenting stuff is allmost as time-consuming as making stuff, I know. And I think you did a great job with the FOSE-docs. Changing the title of the ActorValues List to ActorValues/ResistType would be completely sufficient in to avoid confusion this case I think.
Thanks, and keep fighting the good fight! ;)

[RELz] Fallout Script Extender (FOSE) v1

PostPosted: Sun Aug 16, 2009 11:30 pm
by lucile
Yes, Documenting stuff is allmost as time-consuming as making stuff, I know. And I think you did a great job with the FOSE-docs. Changing the title of the ActorValues List to ActorValues/ResistType would be completely sufficient in to avoid confusion this case I think.
Thanks, and keep fighting the good fight! ;)


The thing is that resist types ARE actor values, which is why they're in that list.

[RELz] Fallout Script Extender (FOSE) v1

PostPosted: Mon Aug 17, 2009 7:11 am
by mollypop
Hey, Scruggsy and team:

I know its a pain in the butt, but with the limited number of keys available for all the content thats coming (I have no less than FIVE), would you be willing to add some more keys to the iskeypressed function?

I was thinking add the ALT or CTRL set (except the windows built in ones of course like ALT-F4..dont want to mess with that).

Basically, I'd like to be able to have the player hit 'G' for one function, and CONTROL+G for another, or scroll lock for one, and Control + Scroll lock for another.

Is there any reason you couldnt set this up?

Thanks in advance,

Elanthil01

aka 'a mad scientist on the loose'