[RELz] Fallout Script Extender (FOSE) v1.1

Post » Thu Feb 11, 2010 3:59 am

I can't wrap the D:\> part in qoutes. The first part is always D:\>

Sorry if it's unclear.

Harmy52
User avatar
kitten maciver
 
Posts: 3472
Joined: Fri Jun 30, 2006 2:36 pm

Post » Wed Feb 10, 2010 10:21 pm

Oh, I were referring to the shortcut. With the prompt open, you should be able to just drag and drop fose_loader.exe into the prompt (should give you the path and file name in quotes) and then you can add -editor. If you have browsed to the directory containing fose_loader, you should be able to write fose_loader.exe -editor. It should look like this:
D:\Users\username>"D:\Program Files\Bethesda Softworks\Fallout 3\fose_loader.exe" -editor

depending on where the command prompt actually opens and which OS you use.
User avatar
Natasha Callaghan
 
Posts: 3523
Joined: Sat Dec 09, 2006 7:44 pm

Post » Thu Feb 11, 2010 12:38 am

Thanks. That worked. :) I'll start om my scripts now ^_^
User avatar
Heather Stewart
 
Posts: 3525
Joined: Thu Aug 10, 2006 11:04 pm

Post » Thu Feb 11, 2010 12:22 pm

Is rand from OBSE not needed anymore? I wanted to use GetRandomPercent and let something happen if the generated number was under, let's say, 30. I figured this.

scn H52RandWeapSCRIPTfloat Random1Begin GameMode	If GetEquipped H52RandWeap == 1		set Random1 to GetRandomPercent		If RandomPercent <= 30			SetWeaponClipRounds to 25		ElseIf RandomPercent <= 60			SetWeaponClipRounds to 50		ElseIf RandomPercent <= 90			SetWeaponClipRounds to 75		ElseIf RandomPercent <= 95			SetWeaponClipRounds to 100		ElseIf RandomPercent <= 100			SetWeaponClipRounds to 0		EndIf	EndIfEnd


But apparently RandomPercent is not used like that.

Any suggestions on how I would do this?

Harmy52
User avatar
Daddy Cool!
 
Posts: 3381
Joined: Tue Aug 21, 2007 5:34 pm

Post » Thu Feb 11, 2010 10:10 am

Where did "RandomPercent" come from in that code? If you want to use the output of http://geck.gamesas.com/index.php/GetRandomPercent, then store its returned value in a variable (as you have done) and compare the value of that variable against thresholds. If you want to use "Rand", then do the same thing except replacing http://geck.gamesas.com/index.php/GetRandomPercent with "Rand".

A "Rand" function was requested because http://geck.gamesas.com/index.php/GetRandomPercent is a pretty bad random number generator. It's not really reason enough to make a mod require FOSE, but if you're going to use it elsewhere anyway then it'd be a good idea to use "Rand" instead of http://geck.gamesas.com/index.php/GetRandomPercent.

Cipscis
User avatar
Natasha Biss
 
Posts: 3491
Joined: Mon Jul 10, 2006 8:47 am

Post » Thu Feb 11, 2010 12:13 pm

In thanks for all the fine work on FOSE, I've created a small token of appreciation for the team.

After all, no game is complete without a http://www.fallout3nexus.com/downloads/file.php?id=10898! :P

I'm working on the Tommy Gun for the FWE team, and figured this was an appropriate token of my appreciation for the fantastic FOSE work you all do. :)

Cheers!

Miax
User avatar
BRIANNA
 
Posts: 3438
Joined: Thu Jan 11, 2007 7:51 pm

Post » Thu Feb 11, 2010 11:45 am

Well, I figured it out, I figured that if I used GetRandomPercent, the game would use RandomPercent. I now have replaced it with my variable. Also, I noticed that I needed to delete the to part of SetWeaponClipRounds. And now to test it out in game. Just a test plugin for me to get semi used with FOSE :)

My updated script: Anything obviously wrong with it?
scn H52RandWeapSCRIPTfloat Random1Begin GameMode	If GetEquipped H52RandWeap == 1		set Random1 to GetRandomPercent		If Random1 <= 30			SetWeaponClipRounds 25		ElseIf Random1 <= 60			SetWeaponClipRounds 50		ElseIf Random1 <= 90			SetWeaponClipRounds 75		ElseIf Random1 <= 95			SetWeaponClipRounds 100		ElseIf Random1 <= 100			SetWeaponClipRounds 0		EndIf	EndIfEnd


Also, your Script Validator, which I really like to use, gave no error when I used RandomPercent. :)

Thanks Cipsis.

Harmy52
User avatar
Matt Terry
 
Posts: 3453
Joined: Sun May 13, 2007 10:58 am

Post » Thu Feb 11, 2010 10:22 am

Well, my script doesn't work. I set it to run in GameMode so that should mean that the Clip Rounds would change at every frame. However it doesn't change. Also, how would I make sure that it only runs on this weapon? I've added something that hopefully would do that, but I'm not sure.

Haere is my script:
scn H52RandWeapSCRIPTfloat Random1float Random2Begin GameMode	If GetEquipped H52RandWeap == 1		Set Random1 to GetRandomPercent		If Random1 <= 30			SetWeaponClipRounds 25 H52RandWeap		ElseIf Random1 <= 60			SetWeaponClipRounds 50 H52RandWeap		ElseIf Random1 <= 90			SetWeaponClipRounds 75 H52RandWeap		ElseIf Random1 <= 95			SetWeaponClipRounds 100 H52RandWeap		ElseIf Random1 <= 100			SetWeaponClipRounds 0 H52RandWeap		EndIf	EndIfEnd



I don't know if the H52RandWeap afterwards is needed.

Any suggestions?

Harmy52

EDIT: Also, the SetWeaponProjectile function does not allow projectiles as a parameter. And that kinda defeats the purpose of the function :P

EDIT2: The SetWeaponAmmoUse doesn't work for me. I basically replaced the SetWeaponClipRounds with it and changed the numbers, and that should hopefully work, but it doesn't.
User avatar
Sophie Miller
 
Posts: 3300
Joined: Sun Jun 18, 2006 12:35 am

Post » Thu Feb 11, 2010 1:17 am

I set it to run in GameMode so that should mean that the Clip Rounds would change at every frame. However it doesn't change. Also, how would I make sure that it only runs on this weapon?

You did make it an object script and placed it on the weapon, right? You can debug the code using http://fose.silverlock.org/fose_command_doc.html#PrintToConsole. Correctly placed, it will tell you which path your script follows.
User avatar
LuCY sCoTT
 
Posts: 3410
Joined: Sun Feb 04, 2007 8:29 am

Post » Thu Feb 11, 2010 2:41 am

Yes I did. Just wanted to make sure. I will try the printToConsole function. Thanks Zumbs.

Okay, how do I use PrintToConsole? It's documentation is rather vague.
User avatar
Emily Jeffs
 
Posts: 3335
Joined: Thu Nov 02, 2006 10:27 pm

Post » Thu Feb 11, 2010 7:50 am

thoughts regarding a potential 'Getexists' command

No offense, but not really. If you have a form ID to pass to GetExists, it's either dynamically created, invalid, or a member of a cell. In all of the cases other than 'invalid' the form exists. The only way you can get an invalid form ID is to wait for a dynamically created ID to expire, which we can't about tell since dynamic IDs are (eventually) reused, so a previously invalid ID could become valid again. If we're talking about actors, then there are a few things it could be checking for. Actors (at least in Oblivion) have one of four process levels: low, medium low, medium high, and high. I don't know the details about when process levels are switched, but putting it simply, actors you are close to or are specially flagged have higher level processing, letting them do more complex behaviors. Low level processing just updates position based on the current time and the AI packages, high can have combat and tons of other stuff. There's also the 3D model state that can be checked, which is handled by a different system.

To implement something I need a solid definition of "exists" (and probably to rename the function).

generic variable export/import function

Something like that has been on the todo list for OBSE for a while. When it happens it will be easy to port, but I can't promise much more than that since we need a pretty complex, flexible, expandable design. So far we haven't looked in to it at all since the ability to run a batch script appears to be good enough for reading config variables.
User avatar
Josee Leach
 
Posts: 3371
Joined: Tue Dec 26, 2006 10:50 pm

Post » Thu Feb 11, 2010 1:37 am

I fixed my problems. I had to remove the GetEquipped line. Not sure why that would interfere though. And the SetWeaponAmmoUse works perfectly just like SetWeaponClipRounds. Thanks guys!
User avatar
Maria Garcia
 
Posts: 3358
Joined: Sat Jul 01, 2006 6:59 am

Post » Thu Feb 11, 2010 10:36 am

Glad you got it figured.

Okay, how do I use PrintToConsole? It's documentation is rather vague.

The http://cs.elderscrolls.com/constwiki/index.php/PrintToConsole entry in the CS wiki is much more comprehensive. Basicly it works something like messages, but it prints out to the console. printToConsole "I got here" will simply output "I got here". You can also output variables by using a code. The start of the code is represented by the % character. The codes I use the most are %.2f (2 digit floats), %n (name of reference) and %i (id of reference). An example of usage
printToConsole "Value of variable: %.2f, Name of reference: %n with ID: %i", someVar, someRef, someRef

User avatar
butterfly
 
Posts: 3467
Joined: Wed Aug 16, 2006 8:20 pm

Post » Thu Feb 11, 2010 3:01 am

Thanks. I can see the benefit of using this. Next time it doesn't work I'll try that.
User avatar
Juliet
 
Posts: 3440
Joined: Fri Jun 23, 2006 12:49 pm

Post » Thu Feb 11, 2010 5:25 am

It's extremely useful for tracking the flow of a script when debugging. I sometimes use "player additem someitem" though. :P
User avatar
lucile davignon
 
Posts: 3375
Joined: Thu Mar 22, 2007 10:40 pm

Post » Thu Feb 11, 2010 2:43 am

A question : Has the co-save API been implemented yet ? What's the possibility of seeing it in the final 1.2 build ? More importantly, has the plugin API been implemented ? Looks like it has.

On a similar note, I was think about porting http://www.gamesas.com/bgsforums/index.php?showtopic=1029117&st=0&p=14900363&#entry14900363 to Fallout 3 and was wondering which version(s) of Fallout 3 were being used the most.
User avatar
Lucky Boy
 
Posts: 3378
Joined: Wed Jun 06, 2007 6:26 pm

Post » Thu Feb 11, 2010 4:48 am

Ooh, now that's something I'd love to see in Fallout 3! Future releases of FOSE are currently slated to support only versions 1.0.0.15 and 1.7.0.3, and I'm fairly certain that just about everyone uses the 1.7 patch nowadays.

Cipscis
User avatar
Niisha
 
Posts: 3393
Joined: Fri Sep 15, 2006 2:54 am

Post » Thu Feb 11, 2010 1:13 pm

Ooh, now that's something I'd love to see in Fallout 3! Future releases of FOSE are currently slated to support only versions 1.0.0.15 and 1.7.0.3, and I'm fairly certain that just about everyone uses the 1.7 patch nowadays.

Cipscis
I see. Thanks for the info.
User avatar
Darrell Fawcett
 
Posts: 3336
Joined: Tue May 22, 2007 12:16 am

Post » Thu Feb 11, 2010 4:34 am

No offense, but not really. If you have a form ID to pass to GetExists, it's either dynamically created, invalid, or a member of a cell. In all of the cases other than 'invalid' the form exists. The only way you can get an invalid form ID is to wait for a dynamically created ID to expire, which we can't about tell since dynamic IDs are (eventually) reused, so a previously invalid ID could become valid again. If we're talking about actors, then there are a few things it could be checking for. Actors (at least in Oblivion) have one of four process levels: low, medium low, medium high, and high. I don't know the details about when process levels are switched, but putting it simply, actors you are close to or are specially flagged have higher level processing, letting them do more complex behaviors. Low level processing just updates position based on the current time and the AI packages, high can have combat and tons of other stuff. There's also the 3D model state that can be checked, which is handled by a different system.

To implement something I need a solid definition of "exists" (and probably to rename the function).


Ok, the entire reason I came up with this idea is simple. To combat a savegame state bug that has existed, continues to exist, and will likely always exist. To whit, actors and objects that seem to cease to exist when you reload a savegame. This effects everything from NPCs to trap states and is easily demonstrated by entering a custom interior space with many traps. Often (not always, but very often) on a reload, such as after dying, instead of the traps resetting and/or the npcs resetting and/or the monsters resetting to the positions and state they should be in according to where and when the game was saved...they are all....gone.

So, where did they go? The general gist of what I've been told is that some kind of bug is just making them...gone...period. As in they are not there...at all...As if they had been hit with .disable and .removeme.

All I'm looking for is a command based on combatting this bug that simply lets a savegame startup script figure out if the object or actor in question, which MUST be persistent has somehow been deleted from the game world.

Are these references, in truth, being somehow completely deleted from the game? I have no idea. I don't have the programming knowledge to make that call, but I figured you guys must know about the situation and what it involves and, therefore, could take my idea and run with it somehow.

As to renaming it...I don't know, anything you want to call it is fine. All I want is to know where the heck my traps, npcs, monsters, rocks, and little green apples are wandering off to everytime someone gets killed and reloads the game. :)

If it's not doable, so be it, I'll just write another letter to Bethesda and ask them to FIX the bug before releasing another game on this engine, not that they will pay attention.
User avatar
Dawn Porter
 
Posts: 3449
Joined: Sun Jun 18, 2006 11:17 am

Post » Wed Feb 10, 2010 9:03 pm

This sounds a lot like an engine bug we've had since Oblivion. The game doesn't properly load saves unless you load them from the main menu, if you load from ingame it tries to use a bunch of shortcuts to cut loading times like assuming the script variables are the same and don't need reloading from the save file, and a few other things. You pretty much just have to only load from the main menu. A tad irritating, but :shrug:.

Anyway, thanks for v1.2! That AddFormToFormList problem was just a killer, particularly as it didn't really stop development but it made testing a faff and release impossible.
User avatar
Ian White
 
Posts: 3476
Joined: Thu Jul 19, 2007 8:08 pm

Post » Thu Feb 11, 2010 12:34 am

Ok, I gather the path functions I mentioned weren't added.
*sigh* well I'll wait and see if they get added in the next iteration.
2 functions to let a mod work... meh, I guess I can wait. :snoring:
User avatar
Brad Johnson
 
Posts: 3361
Joined: Thu May 24, 2007 7:19 pm

Post » Thu Feb 11, 2010 12:01 am

Has the co-save API been implemented yet ? What's the possibility of seeing it in the final 1.2 build ?
It's 99% implemented internally, but ResolveRefID doesn't work because the runtime handles refs in savedata in a different way than in Oblivion.

Ok, the entire reason I came up with this idea is simple. To combat a savegame state bug that has existed, continues to exist, and will likely always exist. To whit, actors and objects that seem to cease to exist when you reload a savegame.

If it's not doable, so be it, I'll just write another letter to Bethesda and ask them to FIX the bug before releasing another game on this engine, not that they will pay attention.
Interesting. Can this happen with refs that are marked to persist? The proper way to resolve this issue isn't to try to work around the bug, it's to try and see if we can solve the bug itself.

At this point I think Bethesda is no longer interested in patching the game, but a fix may show up in Fallout 3.5 or whatever they plan on calling the externally developed one.

Anyway, thanks for v1.2! That AddFormToFormList problem was just a killer, particularly as it didn't really stop development but it made testing a faff and release impossible.
Yeah, that was the main reason for pushing out the new build.

Ok, I gather the path functions I mentioned weren't added.
Not yet, didn't have enough time to go through the request list, only enough to do some basic QA on the new commands to make sure that they do the right thing. I can push out a newer version with those added in a much shorter timeframe than between the last two releases.
User avatar
Sebrina Johnstone
 
Posts: 3456
Joined: Sat Jun 24, 2006 12:58 pm

Post » Thu Feb 11, 2010 5:18 am

Well, if I may request some things, here they are.

SetWeaponJamPercent (On Load)
SetWeaponJamPercent (On Shot)
SetWeaponHasScope Also should have the mesh from the scope if it's possible. Otherwise the standard scope would be nice.

Also, how do the SetWeaponProjectile and SetWeaponCritEffect work? They need a "magic item" of sorts. Could you give me some clues here? :P

Harmy52
User avatar
Cedric Pearson
 
Posts: 3487
Joined: Fri Sep 28, 2007 9:39 pm

Post » Thu Feb 11, 2010 1:17 am

I hope someone can help me out.

I'm looking to scan an area for anything living and I was wondering if one of the IDs does just this, I see from the documentation that IDs 42 NPC, 43 Creatures, 44 Levelcreature and 45 levelcharacter cover the living, but do I have to use them all or would say 43 cover everything, also what is the difference between NPC and creature in terms of FOSE?

Thanks.
User avatar
Samantha Mitchell
 
Posts: 3459
Joined: Mon Nov 13, 2006 8:33 pm

Post » Wed Feb 10, 2010 9:54 pm

It's 99% implemented internally, but ResolveRefID doesn't work because the runtime handles refs in savedata in a different way than in Oblivion.

Interesting. Can this happen with refs that are marked to persist? The proper way to resolve this issue isn't to try to work around the bug, it's to try and see if we can solve the bug itself.

At this point I think Bethesda is no longer interested in patching the game, but a fix may show up in Fallout 3.5 or whatever they plan on calling the externally developed one.

Yeah, that was the main reason for pushing out the new build.

Not yet, didn't have enough time to go through the request list, only enough to do some basic QA on the new commands to make sure that they do the right thing. I can push out a newer version with those added in a much shorter timeframe than between the last two releases.


Thanks Ian, I'd appreciate it. I've been talking with the original author of the Oblivion version and we figured out that those were the only 2 that were stopping a basic version of the mod from being converted. The full thing would require a few more that deal with inventories but after looking at those I got cold chills :blink:
Maybe I can figure out the way to add them but it would take a while(3-4 months :shrug: ).
User avatar
Sierra Ritsuka
 
Posts: 3506
Joined: Mon Dec 11, 2006 7:56 am

PreviousNext

Return to Fallout 3