Jump to content

make a functional hotplate


YanL

Recommended Posts

You seem pretty good at picking it up. I think you'll be fairly expert in a few months, and hardly an amateur before that. This scripting language is much simpler than C++ or something like that, so it's kind of good for jumping right in. But sometimes you miss things from the more complex languages (not that I know what I'm doing in those, but I'm learning).

 

The problem is SetDestroyed doesn't remove the reference from the game. It just makes it so the player can't see rollover text or Activate it. For all we know, the collision box is still hanging around. Your code should have worked without SetDestroyed, so I'm not sure of the nature of this bug.

Link to comment
Share on other sites

  • Replies 65
  • Created
  • Last Reply

Top Posters In This Topic

finish to compile EPD script......I'm speechless. 0_0

 

Ok, let me talk more about this mod. It includes in the safehouses some special items, to encourage the player to liberate all of then, to keep in the good side with all the factions.

 

So we have:

 

1) Campfire portable in Legion

2) reloadbench portable in Ranger house

3) Workbench portable in BoS

4) and in the Followers safehouse, we have a chemistry kit

 

this is the vanilla script

 

 

scn GSChemistrySetScript

short Button
begin OnActivate
if IsActionRef player
ShowMessage GSChemistrySetMsg
endif
end
BEGIN MenuMode 1001
set Button to GetButtonPressed
if ( Button == 1 )
player.AddItem Stimpak 5
SetDestroyed 1
elseif ( Button == 2 )
player.AddItem Psycho 1
player.AddItem Buffout 1
player.AddItem Mentats 1
player.AddItem NVSteadyChem 1
player.AddItem NVReboundChem 1
SetDestroyed 1
endif
END

 

To not destroy the thing, I supose I just change SetDestroyed to 0, right?

 

Course, this must be limited. Maybe one use every 3 days? How to impose this limit?

Edited by YanL
Link to comment
Share on other sites

You seem pretty good at picking it up. I think you'll be fairly expert in a few months, and hardly an amateur before that. This scripting language is much simpler than C++ or something like that, so it's kind of good for jumping right in. But sometimes you miss things from the more complex languages (not that I know what I'm doing in those, but I'm learning).

 

The problem is SetDestroyed doesn't remove the reference from the game. It just makes it so the player can't see rollover text or Activate it. For all we know, the collision box is still hanging around. Your code should have worked without SetDestroyed, so I'm not sure of the nature of this bug.

Why thank you. :D

 

 

Hm, but "MarkForDelete" removes the reference. It's already a part of the first recommendation.

I got this one from an old post by jazziparis in 2013. There he used PlaceAtMe but then MarkForDelete to destroy the reference and avoid savegame bloating.

 

@YanL

I think you may be better with not being too enthusiastic for "SetDestroyed".

If something is destroyed, it cannot be interacted with. No "OnActivate" block. I got this command from plants.

Harvesting plants destroys their activator.

So if you drop that item, you cannot pick it up again when it is destroyed.

 

You actually may be better with EPDGaffney's recommandations. :wink:

Link to comment
Share on other sites

Oh, so it works now? Great. Wish I understood what it was doing before, but all's well that ends well I suppose.

 

Are you scripting with JIP LN? If you want to do an every-three-days limit (which I'm not sure I would, cos players can just wait three days and still abuse it), using JIP LN would be much easier. The alternative I had in mind would use the vanilla GetSecondsPassed, which would be real time, rather than game time, and would be easier to do.

 

You can just delete the SetDestroyed line entirely to stop it getting destroyed.

Link to comment
Share on other sites

Yes, MarkForDelete should remove the reference, but if YanL can still see rollover text, I don't know what it's actually doing. Also, MarkForDelete doesn't really delete mod-added references in most situations, though it does alleviate some performance issues and is still good to use. I think PlaceAtMe mod-added items do get deleted but it's hard to be sure based on what's here:

https://geckwiki.com/index.php/MarkForDelete

Link to comment
Share on other sites

Oh, so it works now? Great. Wish I understood what it was doing before, but all's well that ends well I suppose.

 

Are you scripting with JIP LN? If you want to do an every-three-days limit (which I'm not sure I would, cos players can just wait three days and still abuse it), using JIP LN would be much easier. The alternative I had in mind would use the vanilla GetSecondsPassed, which would be real time, rather than game time, and would be easier to do.

 

You can just delete the SetDestroyed line entirely to stop it getting destroyed.

 

Neh, forget it, it is a stupid idea.

 

I have a better one, a goatskin flask. I would copy the canteen vault script.

 

Does this make my mod illegal? Because the idea is NOT require the courier stash for this mod.

Link to comment
Share on other sites

Wait, just had a look. It's very short, but it uses an effect you'd need to remake, and a message. The message can be less copyright-threatening. The script is really impossible to do differently. I wouldn't worry about it.

 

Edit: If you kept the message the same, it would definitely count as a parody, which would bypass copyright laws. I think you'd have a harder time intentionally breaking the law here than avoiding it.

Edited by EPDGaffney
Link to comment
Share on other sites

the message is

 

""you take a swig from your trusty legionary goatskin flask"

 

ccca28c894f6f4fc590dc3603464f435.jpg

 

Since is a swig and not a sip, double the values for the Vault Canteen.

 

And that´s it. Just need to create a misc item, the message, the heal effect and reproduce the script, with my item, right?

 

There´s a quest there, but I THINK is just to put the item into player inventory

Edited by YanL
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...