player.additem will not save

Post » Fri May 27, 2011 3:58 pm

I'm very new to GECK so I thought I'd start out with some simple scripts. I'm having a bit of a problem with this one:

scn QuestAddItem1short oncebegin gamemode	if once == 1		return	else		player.additem 00004240 50		set once to 1	endifend


When I remove the player.additem line, the script saves fine. While it's there, however, the script will not save. This means there is some sort of error I guess?

Any suggestions?
User avatar
sarah
 
Posts: 3430
Joined: Wed Jul 05, 2006 1:53 pm

Post » Fri May 27, 2011 8:13 am

I've never seen anyone try scripting with the item's actual numeric ID. Try adding it by its item name (like, WeapLaserPistol or whatever)
User avatar
Kathryn Medows
 
Posts: 3547
Joined: Sun Nov 19, 2006 12:10 pm

Post » Fri May 27, 2011 9:34 am

I've never seen anyone try scripting with the item's actual numeric ID. Try adding it by its item name (like, WeapLaserPistol or whatever)


How do I get the item name? Is it the item name in-game without spaces? E.g. 9mmAmmo?
User avatar
Alberto Aguilera
 
Posts: 3472
Joined: Wed Aug 29, 2007 12:42 am

Post » Fri May 27, 2011 11:08 pm

How do I get the item name? Is it the item name in-game without spaces? E.g. 9mmAmmo?


It's the name as you see it in the editor, it's not necessarily the visible name in-game.

Ammo9mm for example.

If you have GECK it should be easy to see.
User avatar
Campbell
 
Posts: 3262
Joined: Tue Jun 05, 2007 8:54 am

Post » Fri May 27, 2011 10:38 am

Just type part of the name of the item you want into the search bar, like 9mm. It will give you a bunch of options, and you can find the actual ammo one and type that name in instead. It should give you an error saying your doing it wrong, but as discussed, errors are broken in the geck right now. :(
User avatar
Zoe Ratcliffe
 
Posts: 3370
Joined: Mon Feb 19, 2007 12:45 am

Post » Fri May 27, 2011 4:42 pm

Just type part of the name of the item you want into the search bar, like 9mm. It will give you a bunch of options, and you can find the actual ammo one and type that name in instead. It should give you an error saying your doing it wrong, but as discussed, errors are broken in the geck right now. :(


Search bar? Whar?

edit: found it. i needed to set the main esm as the active file. should I save my mod with it active?
User avatar
Trevor Bostwick
 
Posts: 3393
Joined: Tue Sep 25, 2007 10:51 am

Post » Fri May 27, 2011 9:21 am

Search bar? Whar?

edit: found it. i needed to set the main esm as the active file. should I save my mod with it active?


You should not have to do that. My search system works perfectly fine with the esm selected and my esp as active. (and no, you don't want to do that)

Double check yourself.
User avatar
Sista Sila
 
Posts: 3381
Joined: Fri Mar 30, 2007 12:25 pm

Post » Fri May 27, 2011 9:35 am

You should not have to do that. My search system works perfectly fine with the esm selected and my esp as active. (and no, you don't want to do that)

Double check yourself.


Ah! I understand. It all makes sense now!

Okay, one more question: How do I get my script to show up in the drop down box when I go to create a new quest?
User avatar
Marnesia Steele
 
Posts: 3398
Joined: Thu Aug 09, 2007 10:11 pm

Post » Fri May 27, 2011 7:53 am


Okay, one more question: How do I get my script to show up in the drop down box when I go to create a new quest?


Make sure you've made it a quest script. When you make a new script the default is object script so you have to use the dropdown menu on the script to change it to quest. Then once you saved the script and closed it up you can go back to your quest and open it up and you will see your script listed in the dropdown list of scripts.
User avatar
Amiee Kent
 
Posts: 3447
Joined: Thu Jun 15, 2006 2:25 pm

Post » Fri May 27, 2011 7:19 am

Make sure you've made it a quest script. When you make a new script the default is object script so you have to use the dropdown menu on the script to change it to quest. Then once you saved the script and closed it up you can go back to your quest and open it up and you will see your script listed in the dropdown list of scripts.


I did just that and it is not appearing. The drop down box is completely empty D:
User avatar
Eoh
 
Posts: 3378
Joined: Sun Mar 18, 2007 6:03 pm

Post » Fri May 27, 2011 7:49 am

I did just that and it is not appearing. The drop down box is completely empty D:


First save the quest, and then reopen it :)
User avatar
Strawberry
 
Posts: 3446
Joined: Thu Jul 05, 2007 11:08 am

Post » Fri May 27, 2011 9:09 pm

First save the quest, and then reopen it :)


Oops... duh. Thank you!
User avatar
Stat Wrecker
 
Posts: 3511
Joined: Mon Sep 24, 2007 6:14 am


Return to Fallout: New Vegas

cron