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

My First Time Scripting (Is This Right?)

General help and troubleshooting.
Post Reply
BackyardStalker
Posts: 57
Joined: Wed Apr 16, 2014 7:33 pm

My First Time Scripting (Is This Right?)

Post by BackyardStalker » Thu Jun 11, 2015 6:33 pm

Not sure if this is the right board, so forgive me if it's not.


I made a patch to add an armor from a mod to various leveled lists using the AddItemToLeveledList function, and I just want to know if I did this right


Here's the quest containing the script:


[collapsed title=Quest][/collapsed]


And the script It controls:


[collapsed title=Script][/collapsed]


LootArmoredDuster75 is a list I made. It contains another list I made called CondArmoredDuster. The latter determines the item's condition, while the former determines the chance of finding it.


I'll ask the original mod author for permission before I upload the patch here.



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

That looks to me like it is

Post by JaxFirehart » Thu Jun 11, 2015 7:06 pm

That looks to me like it is perfect. I can't say I would have done anything differently.



BackyardStalker
Posts: 57
Joined: Wed Apr 16, 2014 7:33 pm

Thanks Jax. Once I finish the

Post by BackyardStalker » Thu Jun 11, 2015 7:17 pm

Thanks Jax. Once I finish the other conversions I had planned, I'll ask the respective mod owners if I can upload them here.


I guess this thread can be closed now. Problem solved.



User avatar
RoyBatty
Gary
Posts: 7742
Joined: Sun Apr 27, 2014 10:26 am
Location: Vault 108

Probably better to use NVSE

Post by RoyBatty » Thu Jun 11, 2015 7:19 pm

Probably better to use NVSE and LeveledListAddForm so that people can uninstall the mod if they don't like it.


Image

BackyardStalker
Posts: 57
Joined: Wed Apr 16, 2014 7:33 pm

Thanks for the tip Roy. Here

Post by BackyardStalker » Thu Jun 11, 2015 8:39 pm

Thanks for the tip Roy. Here's the new script; how does it look?


[collapsed title=Script]


SCN LeveledListArmoredDusterFormListSCRIPT



Begin gameMode



If (GetGameLoaded || GetGameRestarted)

LeveledListAddForm LootArmorTier3 LootArmoredDuster75 1 1 100;

LeveledListAddForm LootArmorTier3100 LootArmoredDuster75 1 1 100;

LeveledListAddForm LootArmorTier375 LootArmoredDuster75 1 1 100;

LeveledListAddForm VendorArmorRare LootArmoredDuster75 1 1 100;

LeveledListAddForm VendorArmorRare75 LootArmoredDuster75 1 1 100;

LeveledListAddForm ConRegulatorDuster ArmoredDuster 1 1 20;

LeveledListAddForm ConRegulatorDuster ArmoredDuster 1 1 25;

LeveledListAddForm ConRegulatorDuster ArmoredDuster 1 1 30;

LeveledListAddForm ConRegulatorDuster2 ArmoredDuster 1 1 20;

LeveledListAddForm ConRegulatorDuster2 ArmoredDuster 1 1 25;

LeveledListAddForm ConRegulatorDuster2 ArmoredDuster 1 1 30;

EndIf



End


[/collapsed]



User avatar
RoyBatty
Gary
Posts: 7742
Joined: Sun Apr 27, 2014 10:26 am
Location: Vault 108

You only need to do this once

Post by RoyBatty » Thu Jun 11, 2015 10:24 pm

You only need to do this once, so stop the quest which does it at the end.


Image

Post Reply