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

Help with script for Wild Wasteland

General mod discussion and requests.
Post Reply
Arkngt
Posts: 382
Joined: Fri Jun 26, 2015 7:52 pm

Help with script for Wild Wasteland

Post by Arkngt » Sat Jul 11, 2015 1:27 pm

I'd like to make my little mod Chess Set compatible with ttw_wildwasteland. It partly already is as you get my replacer if you have the trait (my mod initially disables the separate chess set pieces and puts a unified set there instead). But if you use ttw_wildwasteland and don't have the trait, the Chess Set is still there, so I'd like to have it enabled if having the trait.


My guess is that I have to make my placed Chess Set a reference which has Persistent Reference and Initially Disabled checked - and then I must make a quest and a short script which enables the reference if having the trait. But I suck at scripting so not sure how it should look.


Perhaps I could use the TTWPerkWildWasteland quest that is already there? I guess the script should look something like this, but, as said, what I know about scripting isn't worth knowing...:


scn ChessSetWWScript


short doonce 

Begin GameMode

if doonce == 0

if player.hasperk WildWasteland

enable.ChessSetREF

endif

set doonce to 1

endif

End


Any help would be appreciated!  


You do not have the required permissions to view the files attached to this post.
»You're no match for science!« Doctor Mobius

TrickyVein
Posts: 982
Joined: Fri Mar 29, 2013 3:04 pm

Making a Wild Wasteland

Post by TrickyVein » Sat Jul 11, 2015 1:45 pm

Making a Wild Wasteland encounter is easier than that and doesn't require using a script. 


For your WW references:


Make them parented to WildWastelandEnabler (XMarker). They don't have to be initially disabled or persistent. 


Then draw a trigger around where you want the player to hear the WW trigger sound using GenericWildWastelandTrigger​.


You're done.



Arkngt
Posts: 382
Joined: Fri Jun 26, 2015 7:52 pm

Thanks. Right, it's already a

Post by Arkngt » Sat Jul 11, 2015 2:56 pm

Thanks. Right, it's already a WW encounter in ttw_wildwasteland, so I don't think I have to make one, but rather make it so my replacer works with it. I tried giving my Chess Set the WWSatcomChessBoardXMarker that ttw_wildwasteland places there as an active parent ref, but my Chess Set still shows up if not having the WW trait.


»You're no match for science!« Doctor Mobius

TrickyVein
Posts: 982
Joined: Fri Mar 29, 2013 3:04 pm

What is the problem with

Post by TrickyVein » Sat Jul 11, 2015 3:03 pm

What is the problem with making the regular WW XMarker a parent of your chess set?



Arkngt
Posts: 382
Joined: Fri Jun 26, 2015 7:52 pm

Because I'm not sure which it

Post by Arkngt » Sat Jul 11, 2015 3:19 pm

Because I'm not sure which it is. There are a bunch of XMarkers and the WWSatcomChessBoardXMarker in the cell - I thought it was the latter. One minute - I'll check again.


EDIT: Checking the cell, I have the WWSatcomChessBoardXMarker there and also 9 x XMarkerHeading, none of which seems to be connected to WW. And I can't find any WildWastelandEnabler - not there and not when checking through the Statics either. I find an activator named GenericWildWastelandTrigger - that's as close as I get. In short, I don't know what it is.


»You're no match for science!« Doctor Mobius

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

It's a placed ref somewhere.

Post by Gribbleshnibit8 » Sat Jul 11, 2015 3:37 pm

It's a placed ref somewhere. You should be able to find it easily by looking at the enable parent on the existing chess board and pieces. The enabler you're looking for is in a remote cell somewhere and is used by most/all WW encounters. There's also a Find feature under the edit menu, where you can put in the names of objects and refs and it will find them for you.

Arkngt
Posts: 382
Joined: Fri Jun 26, 2015 7:52 pm

Thanks! It seems to have been

Post by Arkngt » Sat Jul 11, 2015 4:37 pm

Thanks! It seems to have been the WWSatcomChessBoardXMarker in this case. When I checked a separate piece, it had WWSatcomChessBoardXMarker as a parent, but I had set i wrongly for my Chess Set. I had attached it under Active Parents, but it should be set as a reference under Enable Parents rather, as you noted. After doing so, my Chess Set works perfectly with ttw_wildwasteland. :)


»You're no match for science!« Doctor Mobius

Post Reply