Jump to content

I am stumped and not sure what to do


LordMaddog

Recommended Posts

Ok first i have to explana what I want to do

 

I want to turn food into ammo by a weapon I call F.R.C.O (frequency Radiation Compression Oven) basically it forces the radiation out of food into a capsule That I will be used as ammo for my ray beam canon

 

ok now down to the tech in Geck side of things

 

I want to the weapon I made (looks sort of like a high tec oven ) to shoot out/dispense Ray O Capsules witch is easy by changing the projectile into that but now here is where the problems start when I select a none Ammo type of Ammo (I select a list as my type of ammo in this case its the list called FoodNoneAvailable) it shoots the items instead of the projectile

this obviously throws a nasty wrench into the works

I think that this should be able to fix with script but I dont know how any one out there willing to make me a script that can do this

 

now the second problem is that projectiles cant have script attached to them so adding a simple script that remove the projectile from your innovatory and adds the actual ammo cant be added directly But If you add the script to the weapon it self that says some thing like

 

scn AmmoRayCapsuleSCRIPT

 

 

 

Begin onAdd player.additem 0Capsule

 

player.additem 0RayOCapsule

removeme

 

End

 

but that dint work for me at all probably because I am not any were near close

 

 

In the end tho I think both scripts will have to be made into one that is on the weapon witch I am not even sure is possible but then again my script knowledge is piratically 0 so if a scripter out there can help I be every Happy

Link to comment
Share on other sites

Make a generic oximoronic ammo, and attach a script with a gamemode block to the weapon that slowly removes food and gives ammo. You could use a timer to simulate the slow part.

 

lol that sound even harder then what I want to do

 

But I rather have it my way because it will be more along the mod story and add immersion that and I dont want my F.R.C.O to go to waste and at lvl 100 science it will also add crystallized food witch has no radiation (you complete the guys research)

Link to comment
Share on other sites

Well, considering your weapon script really had no sense (seriously).

 

Point is you want something to remove 1 food and add 1-more ammo. Either automagically or by player input, either immediately or taking some time to process.

If you go with the automagic way, you need of course to have some sort of prevention so that it doesn't eat ALL the food.

 

You also want to avoid adding scripts to the food, since that would make your mod rather incompatible. So your script must be either on the gun, or on a quest.

Removeitem <list> <quantity> will remove <quantity> of EVERY item in <list>, which i assume is not what you want to do.

To remove 1 food item, you either need to hardcode each food type into the code, or do a little fose wizardry.

 

So, you want the food conversion to be automatic? if so, with which stopping condition?. If not, do you want the weapon to ask the player if he wants to convert food when equipped?, when running out of ammo?, when equipped but only when done so through the menu?.

Link to comment
Share on other sites

well when you use a list every thing works perfect right up until you shoot and it uses the item as the projectile

 

I thought it would be as easy as adding a script to the gun that tells it to use (<insert name here>) projectile

 

so it would still use the list as ammo but shoot the projectile

 

as for the script I had it was for adding a item to your inventory when you pick up the projectile and I am not to socked to hear it was junk as I have no script aptitude

 

Ill be honest here Basically I am ask for some one to make me 2 scripts one would have to probably be triggered by a quest and one on the weapon

 

the first would be on the gun and it would force it to use a projectile that it would not normally use

 

the second would be to detect if player picked up a particular item and then it would add a new item and remove the old like what the base ball trap dose (witch I am still not sure how it dose lol)

 

Normally I would Do every thing for my own mod just because its the right and fastest way to get some things done and if you need to change some thing you know how to so I do tones of tutorials but scripting can take as long to learn as modeling and that is not some thing I even wanna try to learn so I have to ask here

Link to comment
Share on other sites

Sorry, projectile thing can't be done, tried already. The game ignores the projectile record and uses the item from the list. Some monkey hardcoded the thing.

So i ask again:

So, you want the food conversion to be automatic? if so, with which stopping condition?. If not, do you want the weapon to ask the player if he wants to convert food when equipped?, when running out of ammo?, when equipped but only when done so through the menu?.

Link to comment
Share on other sites

Sorry, projectile thing can't be done, tried already. The game ignores the projectile record and uses the item from the list. Some monkey hardcoded the thing.

So i ask again:

So, you want the food conversion to be automatic? if so, with which stopping condition?. If not, do you want the weapon to ask the player if he wants to convert food when equipped?, when running out of ammo?, when equipped but only when done so through the menu?.

 

o ok :(

 

Ah I see when player equips F.R.C.O it brings up a loot box that you can only put food in the player puts the food in and closes the box the items are then deleted from the game world and the system counts how many items you had put in and gives you 1 Ammo for every item you had in the box

 

thats what your saying right?

Link to comment
Share on other sites

Ok, let's whip up a quick container script, note that stuff between < and > are left for you to change.

 

SCN AmmoTransformerOS

Short Count

Begin OnClose
;getitemcount <list> returns the sum of all the items of foodlist
;i havent tested this, if it doesn't work, you'll have to hardcode
;each food manually
Set Count to getitemcount <FoodItemList>
Player.Additem <AmmoEditorID> Count, 1

;removeitem <list> count removes count of each item in <list>
RemoveItem <FoodItemList> Count
	
;This will move any leftover items to the player.
RemoveAllItems Player, 1
End

 

 

Now the weapon, a simple non-fose one would be this:

SCN FrcoOS

Begin OnEquip Player
 
 ;If the player equips it through a hotkey.
 ;Dont show the menu unless there is no ammo
 ;left
 If (MenuMode)
 Else
   If (Player.getitemcount <ammoeditorID>)
  Return
Endif
 Endif
 
 ;Summons the container to the player, just in case
 ;The container should have no mesh, be persistent and without content
 ;It should also be placed originally on a dummy cell. Keep in mind that you
 ;Want to use the refID here, not the baseID
 <AmmoTransformerRefID>.moveto Player
 
 ;Open the container
 <AmmoTransformerRefID>.Activate Player 1
End

 

 

With fose functions it can be made better tho, to say, listen for the press&hold of the reload key to show the ammo menu. To do this, create a quest, click ok, open it again and set enabled_at_start quest checkbox, give it a delay of 0.2-0.5, and give it this script:

 

SCN FrcoQS

Float Timer

Begin GameMode
If (player.isweaponinlist <listwithonlytheweapononit>)
	If (IsControlPressed 7)
		Set timer to timer + Getsecondspassed
		If (timer > 1.5)
			<AmmoTransformerRefID>.moveto Player
 				;Open the container
			<AmmoTransformerRefID>.Activate Player 1
			Set timer to 0
		Endif
		Return
	Endif
Endif
Set timer to 0
End

Begin MenuMode
Set timer to 0
End

 

 

Its also pretty easy to make the container slowly give you ammo instead of instant conversion. Instead of directly additem the ammo, you increase a variable in a quest, and the quest's gamemode block gives 1 ammo and reduces the variable in 1 (if the variable is not 0 of course). The rate that this happens can be adjusted by changing the quest's delay.

Link to comment
Share on other sites

Ok, let's whip up a quick container script, note that stuff between < and > are left for you to change.

 

SCN AmmoTransformerOS

Short Count

Begin OnClose
;getitemcount <list> returns the sum of all the items of foodlist
;i havent tested this, if it doesn't work, you'll have to hardcode
;each food manually
Set Count to getitemcount <FoodItemList>
Player.Additem <AmmoEditorID> Count, 1

;removeitem <list> count removes count of each item in <list>
RemoveItem <FoodItemList> Count
	
;This will move any leftover items to the player.
RemoveAllItems Player, 1
End

 

 

Now the weapon, a simple non-fose one would be this:

SCN FrcoOS

Begin OnEquip Player
 
 ;If the player equips it through a hotkey.
 ;Dont show the menu unless there is no ammo
 ;left
 If (MenuMode)
 Else
   If (Player.getitemcount <ammoeditorID>)
  Return
Endif
 Endif
 
 ;Summons the container to the player, just in case
 ;The container should have no mesh, be persistent and without content
 ;It should also be placed originally on a dummy cell. Keep in mind that you
 ;Want to use the refID here, not the baseID
 <AmmoTransformerRefID>.moveto Player
 
 ;Open the container
 <AmmoTransformerRefID>.Activate Player 1
End

 

 

With fose functions it can be made better tho, to say, listen for the press&hold of the reload key to show the ammo menu. To do this, create a quest, click ok, open it again and set enabled_at_start quest checkbox, give it a delay of 0.2-0.5, and give it this script:

 

SCN FrcoQS

Float Timer

Begin GameMode
If (player.isweaponinlist <listwithonlytheweapononit>)
	If (IsControlPressed 7)
		Set timer to timer + Getsecondspassed
		If (timer > 1.5)
			<AmmoTransformerRefID>.moveto Player
 				;Open the container
			<AmmoTransformerRefID>.Activate Player 1
			Set timer to 0
		Endif
		Return
	Endif
Endif
Set timer to 0
End

Begin MenuMode
Set timer to 0
End

 

 

Its also pretty easy to make the container slowly give you ammo instead of instant conversion. Instead of directly additem the ammo, you increase a variable in a quest, and the quest's gamemode block gives 1 ammo and reduces the variable in 1 (if the variable is not 0 of course). The rate that this happens can be adjusted by changing the quest's delay.

 

 

OMG my heads swimming I think I might faint how the heck do you do that stuff

 

After some talks with some peeps they said the Ideal with F.R.C.O is nice but it would be more annoying in the end :( I see where there coming from but I still liked the Ideal

 

They suggest just having the gun do the changing its self . What do you think?

 

any way the second script code is equipped to the weapon right I make a empty cell (0cell) and a empty no mesh container (0box) and drag it into empty cell right then I give the 0box a Id ref in the render windo

(ammobox) then in the script I replace <AmmoTransformerRefID> with Ammobox and replace <ammoeditorID> with 0rayocapsual (my ammo id) right?

 

that said I have no clue what to do with the 3rd script

 

the first one <list> = list called FoodNoneAvailable

 

<AmmoEditorID> = 0rayocapsual

 

whats this

<FoodItemList>

 

and now were do I stick this script?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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