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

Post » Sat Feb 19, 2011 9:02 am

I just wanted to point out that ListGetNthForm CAN work when returning a reference...

set rHome1 to ListGetNthForm mbHomeLocationOrderedList Side1


In this code, the 'mbHomeLocationOrderedList' is an ordered list containing the actual references to an activator, not the base form.

This line in my code does return the correct reference form..

But, to reiterate, the next line, using ListGetFormIndex DOES NOT work when trying to get the index for a reference, and always returns -1.
;set locationIndex to (ListGetFormIndex mbLocationOrderedList rLocation)                                                      set locationIndex to (ListRemoveForm mbLocationOrderedList rLocation)                                                      ListAddForm mbLocationOrderedList rLocation locationIndex


So, I commented it out, as seen above, and used the ListRemoveForm/ListAddForm workaround, and it seems to work fine.
User avatar
Latisha Fry
 
Posts: 3399
Joined: Sat Jun 24, 2006 6:42 am

Post » Fri Feb 18, 2011 8:49 pm

The question was related to this thread: http://www.gamesas.com/index.php?/topic/1081974-blicking-effect-shader/
We basically came to the same conclusions that it's possible to use ListGetNthForm to create an isRefInList substitute

Edit: Oh Ok, I didnt really look at it at first :) Remove/Add to get the index is a nice trick, this might actually be faster than searching through the list manually.
User avatar
Chica Cheve
 
Posts: 3411
Joined: Sun Aug 27, 2006 10:42 pm

Post » Sat Feb 19, 2011 12:04 am

Thanks for all your hard work, Ian and the other members of the FOSE team :)
User avatar
Roisan Sweeney
 
Posts: 3462
Joined: Sun Aug 13, 2006 8:28 pm

Post » Sat Feb 19, 2011 7:50 am

[edit]After some testing, I've isolated some sort of bug with this system. I have no idea if it's a core engine bug or what, but for whatever reason, GetItemCount in the loop I've given above actually reports the count of the following item in the object's inventory. For instance, I'll get quirky behaviour like this:

DBG: checking item 9 (Marshal Pistol) count: 0
DBG: checking item 8 (10mm Round) count: 1
DBG: checking item 7 (Mentats) count: 55
DBG: Putting 55 of Mentats into container

There is 1 Marshal Pistol, 55 10mm Rounds, and 1 Mentats in the inventory, in addition to the other stuff... and yes, GetItemCount seriously does return "0"!

It's obviously some sort of fencepost error in the engine, but it boggles the mind because it just doesn't make sense that getting the item type of a given index then checking the item count of that type (with complete disregard for the index) would return the count of the wrong index. Unless this is a FOSE bug?

Try:
			Label 1				set itemType to Lockpick				set itemType to GetInventoryObject i

The game does some caching of local variable values as an optimization; unfortunately this breaks things within loops. It will be addressed in a future release. Setting the variable explicitly before calling GetInventoryObject should clear the cached value.
User avatar
electro_fantics
 
Posts: 3448
Joined: Fri Mar 30, 2007 11:50 pm

Post » Sat Feb 19, 2011 12:52 am

I just wanted to point out that ListGetNthForm CAN work when returning a reference...
(snip)

Yes, I forgot to post back in here that I haven't found any problems using ListGetNthForm. I've actually been using it for quite some time in a couple places, but had forgotten about it...
User avatar
GabiiE Liiziiouz
 
Posts: 3360
Joined: Mon Jan 22, 2007 3:20 am

Post » Sat Feb 19, 2011 1:32 am

Any plans to add the GetPCLastLoadDoor function? Currently I can't find a way to get the players cell.

Also is it impossible to allow passing variables to buttons in a message? Can't even pass %n to the message text, though I know it was stated before that it wasn't supported. Would be nice to have the messageboxEX functionality here, but if it's never going to happen fine just want to know if it's possible.
User avatar
Kay O'Hara
 
Posts: 3366
Joined: Sun Jan 14, 2007 8:04 pm

Post » Sat Feb 19, 2011 7:15 am

Any plans to add the GetPCLastLoadDoor function? Currently I can't find a way to get the players cell.

Is there something wrong with Player.http://fose.silverlock.org/fose_command_doc.html#GetParentCell?
User avatar
elliot mudd
 
Posts: 3426
Joined: Wed May 09, 2007 8:56 am

Post » Sat Feb 19, 2011 7:05 am

Is there something wrong with Player.http://fose.silverlock.org/fose_command_doc.html#GetParentCell?


Oh thanks, when I saw that function I thought it was meant for world spaces.
User avatar
Eileen Müller
 
Posts: 3366
Joined: Fri Apr 13, 2007 9:06 am

Post » Fri Feb 18, 2011 10:25 pm

Hi FOSE team. I just want to start by saying I absolutely love FOSE and couldn't make half of the scripts I want without your excellent toolkit. That said, I have been reluctant to report a bug I may have found fearing it may be due to my coding and not a FOSE error, but I am now fairly certain that the problem lies within the GetFirstRef and GetNextRef functions.

I made a script to perform a RefWalk and then applied a shader to refs that were not disabled and were in the line of sight of the player. This was a big help in visually determining which refs were missed. For the most part it works very well. One problem that keeps popping up, however, is that on occasion some refs fail to be found via the RefWalk. I have made some pictures to exemplify the problem.

The first picture shows a dead Molerat highlighted with its ref ID at the top of the screen. You can also see a printout of all of the refs found in the RefWalk. I added a counter to show that the RefWalk has actually cycled through twice to ensure no refs are missing from the console output. You will notice that the dead Molerat's ID of 0006FE59 is absent from the list of Refs found by the RefWalk.

http://s779.photobucket.com/albums/yy80/HupOranje/RefWalk1.jpg

In the second picture, I have moved closer to the Molerat and the RefWalk has now found the Molerat as exemplified both by the fact that its ID appears in the console output, and my code has applied the red shader to it. You will also notice that although there is only one iteration listed from the console output, that output begins with counter = 1 and ends with the null record indicating that the RefWalk has finished.

http://s779.photobucket.com/albums/yy80/HupOranje/RefWalk2.jpg

In the third picture, I have moved away from the molerat again, and its Ref ID no longer appears in the console output even though the shader applied to the Molerat is still in effect.

http://s779.photobucket.com/albums/yy80/HupOranje/RefWalk3.jpg

To ensure it was not my code that was causing the problem. I made the fourth picture using only a Refwalk script without any other code. This produced the same result as can be seen in the next picture. The Molerat's ID is not included in either iteration of the RefWalk.

http://s779.photobucket.com/albums/yy80/HupOranje/RefWalk4.jpg

Here is the code I ran to produce Pic4. It was a quest script running 5 times a second. IsOn gets set to 1 when a helmet is equipped.

scn UCMetalHelmetFXQuestScriptShort IsOnShort CountShort Count2Short FoundShort NumShort Num2Short RefNumRef rCurRefRef rOldRefBegin GameMode	If IsOn == 1                Set RefNum to 1		Set rCurRef to Apple		set rCurRef to GetFirstRef 200 1 1			;All actors		Label 10		printc "Ref-Walk: %.0f  %n %i" RefNum rCurRef rCurRef                Set RefNum to RefNum + 1		if (rCurRef)			Set rCurRef to apple			set rCurRef to GetNextRef			Goto 10		EndIf ;CurRef        EndIf ;IsOnEnd



The extra variable definitions are left overs from my larger script which produced the first three pictures. I tried this with various combinations of the GetFirstRef function using '200 0 0' & '200 1 0' as the parameters as well with the same results.

Oh, one last note. This was done with FOSE 1.1 Beta 9 and 1.2 Beta 2.
User avatar
Kortniie Dumont
 
Posts: 3428
Joined: Wed Jan 10, 2007 7:50 pm

Post » Sat Feb 19, 2011 3:39 am

I'm not sure that's a problem with http://fose.silverlock.org/fose_command_doc.html#GetFirstRef/http://fose.silverlock.org/fose_command_doc.html#GetNextRef - I think it may be something in the way the game handles active references as you move through the worldspace. I've never been completely clear on this, especially in exterior spaces, but I think I noticed similar things when experimenting with http://www.youtube.com/watch?v=MhWPFmt46R4, which used a completely different approach to affecting all available references of a particular type. My best guess as to what's happening is that references only become "active" (that is, exposed to script functions) when you enter the same cell, although they may remain active after you leave the cell. So as you're running through the wasteland your loop will only pick up things once you've approached them, and continue to see them for some time after you've left them behind. Does that sound like what you're seeing?

In FAIR, I used a large null explosion with a script effect as a method to run commands on all actors in an area. I had started with it being triggered periodically, but I eventually had it only trigger upon entering a new cell, since it wouldn't see new references before then anyway. If you watch http://www.youtube.com/watch?v=6Z-gA-7bJYw in particular, you'll see that in some cases nothing happens until you're almost on top of the new actors in the scene. If you look closely, I have console output to indicate when a new cell is entered - in that video, a new cell is entered when exiting the Megaton gates (obviously), and then another when approaching the merchants.

My guess is that the game has much more access to various references in order to do AI packages, rendering, and everything else that it needs to do, but the pool of data exposed to script functions is much more conservative.

If anyone can confirm, correct, or clarify any of this I'd certainly appreciate it.
User avatar
Dean Ashcroft
 
Posts: 3566
Joined: Wed Jul 25, 2007 1:20 am

Post » Sat Feb 19, 2011 3:30 am

hey guys i just thought id bring this to your attention as it really bugs me.
when using FOSE you cant use the live function i was just wondering if there is a way around this.
User avatar
Wayne Cole
 
Posts: 3369
Joined: Sat May 26, 2007 5:22 am

Post » Sat Feb 19, 2011 3:43 am

hey guys i just thought id bring this to your attention as it really bugs me.
when using FOSE you cant use the live function i was just wondering if there is a way around this.

Yes, they know, as that's explained in both the readme (in the download and the OP here) and on the http://fose.silverlock.org/. There is no way around it.

In case you're having trouble finding it, here is what they say:

* 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.
User avatar
Chris Duncan
 
Posts: 3471
Joined: Sun Jun 24, 2007 2:31 am

Post » Sat Feb 19, 2011 1:41 am

hey guys i just thought id bring this to your attention as it really bugs me.
when using FOSE you cant use the live function i was just wondering if there is a way around this.


I assure you, they're aware. I don't mean to put words in their mouths, but don't expect a fix anytime soon. That's how it's been since day 1. The problem is with how Live, not FOSE.
User avatar
Sammygirl500
 
Posts: 3511
Joined: Wed Jun 14, 2006 4:46 pm

Post » Sat Feb 19, 2011 3:09 am

One request I would have for FOSE is to add the http://cs.elderscrolls.com/constwiki/index.php/RunBatchScript function like they have in OBSE. However if that won't be added to FOSE then I don't have a problem with it as FOSE has already helped me a lot with my mod. So thanks for the script extender either way.
User avatar
Claire Vaux
 
Posts: 3485
Joined: Sun Aug 06, 2006 6:56 am

Post » Sat Feb 19, 2011 5:29 am

I found out that placing a printc command into a Begin block of an AI package caused the game to crash before ever even reaching the load screen. But placing it an End blocked worked. I didn't try the Change block. Any thoughts about this? Is it repeatable for any of you?

I wasn't passing variables, just displaying some text.
User avatar
Georgine Lee
 
Posts: 3353
Joined: Wed Oct 04, 2006 11:50 am

Post » Fri Feb 18, 2011 9:45 pm

I'm not sure that's a problem with http://fose.silverlock.org/fose_command_doc.html#GetFirstRef/http://fose.silverlock.org/fose_command_doc.html#GetNextRef - I think it may be something in the way the game handles active references as you move through the worldspace...



I don't think that is what I have seen. I can move about the wasteland and pick up actors at a great distance and still have ones relatively close that are not picked up by the ref walk. In those example pics I posted earlier, I moved from a spot where the molerat was not picked up to a point where it was. But then I moved back to virtually the same spot and it was excluded from the ref walk again. So that 'persistency' after being found did not hold true in my case.
User avatar
Taylor Thompson
 
Posts: 3350
Joined: Fri Nov 16, 2007 5:19 am

Post » Sat Feb 19, 2011 10:42 am

I don't think that is what I have seen. I can move about the wasteland and pick up actors at a great distance and still have ones relatively close that are not picked up by the ref walk. In those example pics I posted earlier, I moved from a spot where the molerat was not picked up to a point where it was. But then I moved back to virtually the same spot and it was excluded from the ref walk again. So that 'persistency' after being found did not hold true in my case.

Ah, I guess I missed that part. Have you tried adding some code to indicate when cell transitions are happening, so you can see if it corresponds with any of the unusual behavior you're seeing? I can strip out the code I've used for that in the past if it might help.
User avatar
Penny Flame
 
Posts: 3336
Joined: Sat Aug 12, 2006 1:53 am

Post » Sat Feb 19, 2011 12:03 am

@pkleiss: We recently fixed an unsigned arithmetic error in OBSE's version of GetFirst/NextRef which can cause the x component of a cell's coordinates to be off by one on certain inputs. The same bug has likely been ported over to FOSE; if so the same fix should apply. For the time being, I'd suggest adding 1 to the cell depth param (e.g. pass 2 instead of 1).
User avatar
Dj Matty P
 
Posts: 3398
Joined: Sat Jun 09, 2007 12:31 am

Post » Fri Feb 18, 2011 8:31 pm

Ah, I guess I missed that part. Have you tried adding some code to indicate when cell transitions are happening, so you can see if it corresponds with any of the unusual behavior you're seeing? I can strip out the code I've used for that in the past if it might help.

Sorry, this is a little late, but ya, I'd love to see what code you have for that.

@pkleiss: We recently fixed an unsigned arithmetic error in OBSE's version of GetFirst/NextRef which can cause the x component of a cell's coordinates to be off by one on certain inputs. The same bug has likely been ported over to FOSE; if so the same fix should apply. For the time being, I'd suggest adding 1 to the cell depth param (e.g. pass 2 instead of 1).

Okay, I did try to set the depth to 3, and I have to admit, I haven't noticed the issue since. But I haven't thoroughly tested it as I have been working on other stuff. So thanks for the heads up! :thumbsup:
User avatar
Brandi Norton
 
Posts: 3334
Joined: Fri Feb 09, 2007 9:24 pm

Post » Sat Feb 19, 2011 5:51 am

How do I run two instances of Fallout 3 using FOSE? I need to have both game windows visible on the same user account desktop so I can test multiplayer by myself. Without FOSE all I needed to do was use a sandbox program to run fallout 3 more than once.
User avatar
MISS KEEP UR
 
Posts: 3384
Joined: Sat Aug 26, 2006 6:26 am

Post » Sat Feb 19, 2011 8:46 am

unsigned arithmetic error in OBSE's version of GetFirst/NextRef

I'll port that over.

How do I run two instances of Fallout 3 using FOSE? I need to have both game windows visible on the same user account desktop so I can test multiplayer by myself. Without FOSE all I needed to do was use a sandbox program to run fallout 3 more than once.

Make your plugin write 0xEB to memory address 0x006EE339 to remove the mutex check at startup.
User avatar
JUan Martinez
 
Posts: 3552
Joined: Tue Oct 16, 2007 7:12 am

Post » Sat Feb 19, 2011 11:00 am

New request: is there any way for the SetName function to accept a formatted string parameter instead of a constant string?
User avatar
Kelly James
 
Posts: 3266
Joined: Wed Oct 04, 2006 7:33 pm

Post » Sat Feb 19, 2011 9:57 am

Hi there, I just wanted to point out that the FOSE documentation could need an update. (already PM'ed that scruggs on nexus)

I also could need a function for my equipment recycler mod. I made it that way that you can recycle equipment and junk to scrap metal based on the items weight. But I wanted to make top condition weapons and armors return more scrap than worn outs. So I could need a function that returns me an items condition, either 0 to 1 float or 0 to 100 float or whatever, like GetWeight.

I'm also wondering if it would be possible to find an activator object in the scripts cell. What I mean is that I have a little quest for the recycler: you have to repair an electics box (the ones that explode when you shoot them) next to it to make it work. I used 2 boxes, a broken one and a fixed one, last one disabled by default. Can I somehow check if the fixed one is visible or not?
Because then I could remove the global var I currently use to show if the box is fixed or not.
User avatar
kennedy
 
Posts: 3299
Joined: Mon Oct 16, 2006 1:53 am

Post » Fri Feb 18, 2011 6:41 pm

I would really like to no why i can't run FOSE. I followed the ReadMe.Just random crashes like walking through the waste,cities etc.(It's not picking when it crashes). I installed FWE,(which requires it)also Tried Fook 2 1.0 and 1.1Beta.(No luck there) I did not run those 2 together.But after several reinstalls of Fallout 3(Clean install everything gone) I install FWE or Fook 2 and i get random crashes. The only Game changing mod that does not require FOSE which i can run is MMM. I am at my wits ends when it comes to crashes.About ready to go back to Console. I have a few other not major mods (Which none require FOSE) So as of now i have MMM and a few small mods and the game runs great. I would really like to run some of the bigger mods.



System Specs:



Cpu AMD Sempron 140 3.0 GHZ

Memory 4 Gig DDR3

Video Card ATI Raideon HD (HDMI Connection) 512MB DDR 3

42" Inch monitor.
User avatar
Tyrone Haywood
 
Posts: 3472
Joined: Sun Apr 29, 2007 7:10 am

Post » Fri Feb 18, 2011 7:54 pm

I fixed it by removing Fallout 3 ( SMASHING dics) and going back to console.
User avatar
Michelle Serenity Boss
 
Posts: 3341
Joined: Tue Oct 17, 2006 10:49 am

PreviousNext

Return to Fallout 3