Jump to content

Photo

Adding Items to Levelled Lists/GRA


  • Please log in to reply
19 replies to this topic

#1
jtucker40

jtucker40

    Fan

  • Members
  • PipPipPip
  • 266 posts

Hi guys, 

 

I am an absolutely terrible scripter, and at the moment I'm putting the finishing touches on a weapon mod.  I want to implement the weapon into the game's levelled lists, however I have no idea how to do so. 

 

Say I had a weapon with the item id "WeaponA".  How would I go about adding this item to the levelled lists?

 

I also want to make this weapon for sale from Gun Runners Arsenal, but I noticed that the Vendortron does not have a chest to add items to.  Does this involve scripting as well?



#2
Ladez

Ladez

    Useful Idiot

  • Supporter
  • PipPipPipPip
  • 1,818 posts

You need to use the AddItemToLeveledList function. It could look like this in a quest script:

ScriptName WeaponAAddScript

Begin Gamemode
    AddItemToLeveledList GunRunnerGunsAllTier5 WeaponA 1 1 99
    StopQuest WeaponAAddQuest
End

You just need to add this script to a new start enabled quest and the gun will be added to the Gun Runner's store at tier 5.

 

The vendor chest for the Vendortron is called VendorContainerGunRunnerHQ, but you don't need to do anything involving the chest. Adding it to the leveled list is sufficient.



#3
jtucker40

jtucker40

    Fan

  • Members
  • PipPipPip
  • 266 posts

Awesome, thanks for the help.

 

Say I also had two weapon mods that came along with the weapon that I want to be sold at Gun Runners as well, with item ids "WeaponAMod1" and "WeaponAMod2"

 

Would I just need to say:

ScriptName WeaponAAddScript

Begin Gamemode
    AddItemToLeveledList GunRunnerGunsAllTier5 WeaponA 1 1 99
    AddItemToLeveledList GunRunnerGunsAllTier5 WeaponAMod1
    AddItemToLeveledList GunRunnerGunsAllTier5 WeaponAMod2
    StopQuest WeaponAAddQuest
End

Also I want to have the weapon appear on higher level enemies as you travel around the wasteland.  How would I go about doing that?


Edited by jtucker40, 23 October 2014 - 07:31 PM.


#4
Ladez

Ladez

    Useful Idiot

  • Supporter
  • PipPipPipPip
  • 1,818 posts

You could do that, but there are lists for mods as well. An example would be VendorWeaponModsGunsExplosivesTier5. Not sure if one approach is better than the other.

 

As for getting them on enemies, the only advice I can give is to look at the inventories of enemies and see what lists they use. A raider might, for instance, use RaiderWeaponRifle, which will give him rifles depending on the players level.



#5
jtucker40

jtucker40

    Fan

  • Members
  • PipPipPip
  • 266 posts

Ok, so I took the concepts from the geck wiki page, and also pretty much copied the levelled list script from another mod that I know works, and made a script with all of the additions that I want.  I also made new levelled loot lists for the gun.  However when I check the Vendortron's inventory, neither the gun nor the weapon mods show up.  This is what the script and quest looks like.  Does anyone have any idea what the problem could be?

 

foAJYCB.png



#6
DaWrecka

DaWrecka

    Old hand

  • Members
  • PipPipPip
  • 552 posts
Checking the obvious; (at least, the obvious for me) Are you waiting elsewhere for the inventories to reset? By default, it takes 72 hours of in-game time (at least, it was 72 in Fallout 3, I haven't checked if it's the same with NV) before a vendor's inventory is recalculated. Other than that, nothing jumps out at me as being the problem; your code LOOKS solid. I'd have written the if statement a little differently, but there's absolutely nothing wrong with the way you've done it.

#7
Ladez

Ladez

    Useful Idiot

  • Supporter
  • PipPipPipPip
  • 1,818 posts

Yes, wait 72 hours for the inventory to reset or force a reset by calling ResetInventory on the chest reference.



#8
jtucker40

jtucker40

    Fan

  • Members
  • PipPipPip
  • 266 posts

Ok so I waited for 72 hours and sure enough, the weapon appeared in the Vendortron's inventory.  Only problem is it is at like 40% condition, meaning that it must be coming from the CondNVM60Loot leveled list and not the command that inserts a 99% condition weapon into Gun Runners.  Also the modifications are also not showing up in the Vendortron's inventory.

 

Also, is there any way I can test to see if the weapon spawned on enemies other than just walking around and trying to get into encounters?

 

EDIT: Wait, I'm stupid, CondNVM60Loot is in the Gun Runner's slot, so it seems to be working correctly.  But I'm still trying to find out why the modifications aren't showing up.


Edited by jtucker40, 23 October 2014 - 10:50 PM.


#9
Ladez

Ladez

    Useful Idiot

  • Supporter
  • PipPipPipPip
  • 1,818 posts

Your modifications are not guaranteed to show up since one is picked from the list at random. If you want to get around that so the mod is guaranteed to show up, you can add it directly to GunRunnerStoreTier4. That one has the Use All flag ticked, so all the listed items will be added.

 

You can test it on enemies by spawning one of them at your location with PlaceAtMe.



#10
jtucker40

jtucker40

    Fan

  • Members
  • PipPipPip
  • 266 posts

Ok so I tried adding the weapon mods directly to GunRunnerStoreTier5, and they still don't show up, even after waiting 72 hours.  

 

Here's the script:

scn M60LevelledListQuestScript

short iDoOnce

BEGIN GameMode

if (iDoOnce == 0)
	StartQuest M60LeveledListsMod
	AddItemToLeveledList VendorWeaponsGunsTier5 CondNVM60Loot 1 1 99
	AddItemToLeveledList GunRunnerGunsAllTier5 CondNVM60Loot 1 1 99
	AddItemToLeveledList GunRunnerStoreTier5 aaaM60bipod 1 1 100
	AddItemToLeveledList GunRunnerStoreTier5 aaaM60internals 1 1 100
	AddItemToLeveledList 188NCRArmsMerchantMods aaaM60bipod 1 1 100
	AddItemToLeveledList 188NCRArmsMerchantMods aaaM60internals 1 1 100
	AddItemToLeveledList LL2Tier3GunsLegionPrime WithAmmoNVM60Loot 1 1 100
	AddItemToLeveledList RRCGreatKhanRanged WithAmmoNVM60Loot 1 1 100
	AddItemToLeveledList NCRHeavyTrooperWeapons WithAmmoNVM60Loot 1 1 100	  
	set iDoOnce to 1
	StopQuest M60LeveledListsMod
endif

END

Is there anything wrong with it, or is there something else I could be doing wrong?


Edited by jtucker40, 24 October 2014 - 01:39 AM.





Page loaded in: 0.784 seconds