Jump to content

3 can you do this Mod questions


Deleted2746547User

Recommended Posts

I'm new at this but in the process of cleaning up NCRCF and making a quest to turn it into a player base. I have a couple of questions about scripting to do a few things...

 

1. I'd like to link my various inventory containers to a computer terminal that will allow, among other things: me to sort/track my inventory and also "order" (construct) items that can be crafted... for ex/ I have food, raw food, etc. - enough to produce item "x" ... once I hit order and amount, it puts the produced item into a different inventory container and removes the items used from their various containers? (Much like the one in FEE's (?) Portable tent

 

2. I've seen a mod that allows you to use ovens of you have fuel, repair skills, etc. I was wanting to do something similar but for house/base lighting. Would it be possible to tie all base lighting to a terminal for the purpose of turning different ones off/on (say options to turn indoor lighting off/ perimeter lighting, etc.) BUT TO also force you to place fuel in a "tank" for the purpose of running the generators. So, if you ran all the lighting at night it might require x number of fuel units, or if you only ran perimeter/indoor lighting it might be less.

 

ANY SUGGESTIONS or ideas or help would be greatly appreciated!!!

 

(what im trying to do is create a link to a laptop/terminal that allows you to manage everything (if you choose): Companions, Inventory, Base operations (patrols, power, etc.)

 

I KNOW a of that is complicated... and will def. be a work in progress... but any help/pointers would be wonderful.

 

(I've already fixed the cells around/inside NCRCF (except for a few rooms in the Admin. Center - ?) and navmeshed it (though that needs some tweaking).

Link to comment
Share on other sites

1. I'd like to link my various inventory containers to a computer terminal that will allow, among other things: me to sort/track my inventory and also "order" (construct) items that can be crafted... for ex/ I have food, raw food, etc. - enough to produce item "x" ... once I hit order and amount, it puts the produced item into a different inventory container and removes the items used from their various containers? (Much like the one in FEE's (?) Portable tent

definitely possible, but a hell of scripting

 

2. I've seen a mod that allows you to use ovens of you have fuel, repair skills, etc.

...pardon...?

 

I was wanting to do something similar but for house/base lighting. Would it be possible to tie all base lighting to a terminal for the purpose of turning different ones off/on (say options to turn indoor lighting off/ perimeter lighting, etc.) BUT TO also force you to place fuel in a "tank" for the purpose of running the generators. So, if you ran all the lighting at night it might require x number of fuel units, or if you only ran perimeter/indoor lighting it might be less.

possible & not that hard. you'd set the items you want to affect persistant, give them unique ref-names and tell them what to do in the terminal items' result scripts. and for the fuel thing, you'd have to keep track of your fuel supply in a variable and make it's height a condition for the relating terminal item to appear.

so if you, say, want to turn on a radio, but only if there's enough fuel, you'd

.) set the radio persistant and give it a unique name like radioREF

.) add a script to the terminal that defines a variable like int Fuel (and best set the terminal persistant and name it as well, so you can easier access the fuel-variable from elsewhere later)

.) add a menu item to your terminal, with a result script like "radioREF.setopenstate 1" and give it a condition getScriptVariable (-> YourTerminalREF -> YourFuelVariable -> run on subject) > 0 (or however much fuel your radio needs :-) so the menu item doesn't show if there's not enough fuel.

and this should already be it, if i haven't forgotten anything.

well and you'd have to keep track of your fuel amount of course, if you add 1 fuel set YourTerminalREF.Fuel to YourTerminalREF.Fuel + 1

Link to comment
Share on other sites

@ stevie : thank you so much for the advice... I'm still stuck on assigning/managing the guard/patrol markers around the towers, etc. but I"ve also started work (have already placed most of the items (the fuel tanks, etc. terminal and given them unique ID;s in prep. for that.. Definitely sounds like a lot of work...and confusing too.. but thank you so much for the advice. DEFINITELY gives me a starting point (and now i dont have to wander aimlessly around just trying to start this.)

 

What I meant about the ovens.... there is a mod (so sorry cant rem the creator ;( ) but it lets you fix ovens you encounter throughout the wasteland.... some work automatically (crafting food items) and dont need to be repaired or need fuel - say the oven in the lucky 38, etc. but ones in the wastes might need a pilot light and flamer fuel to work. :)

 

Well, that gives me a start..... i will try that and probably ask you some follow up questions if thats ok.... thanks so much for your help (im going to def. need it)

Link to comment
Share on other sites

stevie.... 2 quick follow up questions.. if I had a "tank" like a water tank that I was using as the container to hold fuel... how would be the best way to "put" it into the game? I mean, I have a tank with a unique id... whats the best way to allow you to put fuel in it... and then "tie" it to the terminal.

 

and as for the fuel requirements - let's say I have 30 "units" of fuel ...and i say it requires 10 units to run full (all lights/power needs) a day or 5 units for half (either perimeter or indoor needs).... how would script that... and once the fuel ran out... would it keeps the power off until i refilled it. last one...would i be possible to easily add options for powering it on either 1 or multiple days depending on fuel supplies. mmm maybe that is getting too complicated.

 

 

thx again for your help!

Link to comment
Share on other sites

1. I'd like to link my various inventory containers to a computer terminal that will allow, among other things: me to sort/track my inventory and also "order" (construct) items that can be crafted... for ex/ I have food, raw food, etc. - enough to produce item "x" ... once I hit order and amount, it puts the produced item into a different inventory container and removes the items used from their various containers? (Much like the one in FEE's (?) Portable tent

 

Sortomatic is a resource you can easily add to you mod. You can craft from items in any of your containers with that. It doesn't behave exactly like you describe above. New items will be added to the players inventory, but can easily be sorted back to their home containers.

There are a lot of other stock tracking features too. It's quest friendly - notes are in the developer docs and you can hit me or Gribbles up for build advice while you work :)

 

2. I've seen a mod that allows you to use ovens of you have fuel, repair skills, etc. I was wanting to do something similar but for house/base lighting. Would it be possible to tie all base lighting to a terminal for the purpose of turning different ones off/on (say options to turn indoor lighting off/ perimeter lighting, etc.) BUT TO also force you to place fuel in a "tank" for the purpose of running the generators. So, if you ran all the lighting at night it might require x number of fuel units, or if you only ran perimeter/indoor lighting it might be less.

 

That's certainly possible, and you can make it as complex (or realistic) as you wish.

Loads of different ways to crack the problem too. Stevie's suggestion is one way that would work :)

 

I'd use a BasePowerQuest to handle all the processing, which will probably make it easier to manage and extend in the long run.

Each of your power users would need a persistent ref. (you could use an X-marker object for lighting whole areas - the lights would use the X-marker as an enable parent.)

The quest would have a variable of energy_stock. When you add fuel then this inceases (say 10,000 units added when you deposit a fission cell)

Your terminal and switches could set AreaX_ON variables in the quest.

 

The quest script by default runs every 5 secs, so during that process cycle it...

Looks at all switch states, and adds the total power usage for this cycle. (You could make some resources use more power than others)

Removes that power from the Energy_stock variable.

Then if enery_stock > 0 {enable/disable each of the X-makers that correspond to the AreaX_ON switches}

Or, disable all X-markers when out of energy. (and reset energy_stock to 0, as negative energy makes no sense)

 

That's a 'rough' logic. You can easily add new features in the one script.

eg. reduce the cycle power by 10 if it is daytime and the solar array has been fixed.

 

I like the power idea. I can see my character wondering if he left the iron on at home while out in the wastes.

Link to comment
Share on other sites

@ tunaisafish thanks so much for the advice.... so very cool.. it's nice being in a community where people actually help one another. :) WOW... sounds like this is going to be very hard.... a challenge!

 

One question... (preceding the 1,001 that will come later :) .. if I make a unique container for the fuel...how do you tie it to the scripts? ...and make it where the container only accepts fuel, fission batteries or whathaveyou? :)

Link to comment
Share on other sites

stevie.... 2 quick follow up questions.. if I had a "tank" like a water tank that I was using as the container to hold fuel... how would be the best way to "put" it into the game? I mean, I have a tank with a unique id... whats the best way to allow you to put fuel in it... and then "tie" it to the terminal.

you can add a script to your tank like

int FuelAmount

begin onActivate
    set FuelAmount to player.GetItemCount YourFuelItem
    if FuelAmount > 0
         player.removeItem YourFuelItem FuelAmount
         set YourTerminalREF.Fuel to YourTerminalREF.Fuel + FuelAmount       ; this assumes you have your terminal persistant, 
    endif                                                                                                           ; named and with a variable for the fuel (see my prev. post)
end

 

and as for the fuel requirements - let's say I have 30 "units" of fuel ...and i say it requires 10 units to run full (all lights/power needs) a day or 5 units for half (either perimeter or indoor needs).... how would script that... and once the fuel ran out... would it keeps the power off until i refilled it. last one...would i be possible to easily add options for powering it on either 1 or multiple days depending on fuel supplies. mmm maybe that is getting too complicated.

you need a timer (there's an article on the geck-wiki on how to do that), and then you just regularily reduce the fuel-variable on your terminal

Link to comment
Share on other sites

What I meant about the ovens.... there is a mod (so sorry cant rem the creator ;( ) but it lets you fix ovens you encounter throughout the wasteland.... some work automatically (crafting food items) and dont need to be repaired or need fuel - say the oven in the lucky 38, etc. but ones in the wastes might need a pilot light and flamer fuel to work. :)

ah, that's easy, you just need to attach the vanilla crafting script to the oven, that's all.

Link to comment
Share on other sites

That's certainly possible, and you can make it as complex (or realistic) as you wish.

Loads of different ways to crack the problem too. Stevie's suggestion is one way that would work :)

I'd use a BasePowerQuest to handle all the processing, which will probably make it easier to manage and extend in the long run.

i'm not that good at quests yet (just started modding two months and something ago), so i try to avoid them whereever i can (yet)... hehe... ;-)

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...