The forum has been set to read-only mode. For community discussion and questions, head over to our Discord: https://discord.taleoftwowastelands.com

Wasteland Location

Have something to say about Tale of Two Wastelands or have an idea for a new feature? Let us know here.
Post Reply
Gribbleshnibit8
Posts: 481
Joined: Sun Nov 04, 2012 2:06 am

Wasteland Location

Post by Gribbleshnibit8 » Fri Nov 23, 2012 12:27 am

Is there a global value that will allow mods to determine which wasteland the player is currently in? If not, can this be implemented as a read-only value please?


I've been working on a method to determine which worldspace the player is currently. It's doable, but not without either lots of BuildRef to avoid mod dependency, or just making a mod dependency to get all the worldspaces I need. Either way sucks.


Having this included in TTW would make making compatible mods much easier. I can think of two methods to do it, one requiring NVSE, the other not. The not way is a bit hacky, but worked in my short testing. It's designed to run in a quest with a delay of 5 seconds, and will retain the last worldspace the player was in (going into an interior from DC will remember DC, etc). The world data is held in global values, since globals can be built using NVSE BuildRef and the value retrieved using GetGlobalValue. My example uses separate global for each worldspace, but it might be better to combine them all into one global, and use a different value for each world. That way a mod only has to build one ref instead of a half dozen+.


Script here


A relatively simple edit to the travel scripts would allow the travel script to immediately update the global value when traveling from DC to NV and vice versa.



TJ
Posts: 2181
Joined: Mon Sep 17, 2012 1:06 pm

I could see this being super

Post by TJ » Fri Nov 23, 2012 1:53 am

I could see this being super useful like the new framework in the travel method. If it's built into TTW it makes it easier for coders to use and focus on modding instead of everyone coming up with their own way to do the same thing.


My project Dash is on Kickstarter!



thermador
Posts: 773
Joined: Tue Aug 07, 2012 2:24 pm

Right now travel mods need to

Post by thermador » Fri Nov 23, 2012 4:30 am

Right now travel mods need to set stages in the quest TTWFunctions. These quest stage result scripts do the things that need to be done when the player travels.

A global variable could easily be added to TTW, which would be set by these result scripts.

Gribbleshnibit8
Posts: 481
Joined: Sun Nov 04, 2012 2:06 am

Well, the reason I suggest

Post by Gribbleshnibit8 » Fri Nov 23, 2012 5:09 am

Well, the reason I suggest this method (horrible as it is) is because I need to know specifically to the DLC where the player is. Two mods I have right now need it. My rewrite of the Ambient Temp mods, to handle all DLC locations, as well as merge FNV and FO3 versions. And my Radio Hotkey mod, so that I know where the player is and what radio stations are available in those locations.


If DLC level location data is not made available, I'll have to roll my own solution with another file in the load order sad



thermador
Posts: 773
Joined: Tue Aug 07, 2012 2:24 pm

I agree; I think a global

Post by thermador » Fri Nov 23, 2012 3:38 pm

I agree; I think a global variable should be added to TaleOfTwoWastelands.esm. A 'short' variable with


0=player in new Vegas

1=player in capital wasteland

2=player in mothership zeta

3=player in dead money ... etc.


You get the idea; numbers could be assigned however. Then we could add more stages to the TTWFunctions quest to handle the transport to/from each DLC. In its result script, each stage would set the global properly, turn off all of the old radios, turn on the new radios, etc.


The reason Jax set up the TTWFunctions quest is so other mods can use it for world transport, and they will always be compatible with the latest version of TTW -- i. e. The TTW team can update the result scripts (to fix bugs etc.) without having to ask everyone to update their other mods.


So you could talk to jax about it, or hopefully he'll chime in here, and we can add those features to ttwfunctions.



JaxFirehart
Posts: 3003
Joined: Wed Sep 12, 2012 12:33 am

I would love to add those

Post by JaxFirehart » Fri Nov 23, 2012 4:45 pm

I would love to add those functions. It would be easy enough. I can't promise them for the next release, but I'll get on them.



Gribbleshnibit8
Posts: 481
Joined: Sun Nov 04, 2012 2:06 am

Sounds good then. I'll run my

Post by Gribbleshnibit8 » Fri Nov 23, 2012 8:40 pm

Sounds good then. I'll run my own solution until you guys get yours going. Is the new travel stuff in the current release? I'd like to look over it and see if I can come up with any other things that would be nice to have standardized.


On a note unrelated to this, would it be possible to get a built in NVSE check that any mod can use? To save every mod needing an NVSE checker quest.



thermador
Posts: 773
Joined: Tue Aug 07, 2012 2:24 pm

Yep the travel stuff is in

Post by thermador » Fri Nov 23, 2012 9:34 pm

Yep the travel stuff is in the current release on the alpha page.  Check out stages 0 to 3 of the quest TTWFunctions.



Krux
Posts: 122
Joined: Mon Nov 12, 2012 6:48 am

this isn't english to me, lol

Post by Krux » Wed Nov 28, 2012 6:02 pm

this isn't english to me, lol


sounds good! good luck! =D


Banned 11-12-2012 for Piracy
Reinstated 11-12-2012 upon receiving proof of purchase

Post Reply