Jump to content
The Dark Mod Forums

Drumple's Potions


Springheel

Recommended Posts

I've added drumple's potions to CVS. He sent me some def files but I have no idea what to do with them. Thought I'd post them here for now.

 

i changed a def file and added a new one to make them selectable from the darkmod/item area in the doom3 editor, here

are the defs

 

entityDef darkmod_item_healthpotion

{

"inherit" "darkmod_item_default"

"editor_color" ".3 .3 1"

"editor_mins" "-16 -16 0"

"editor_maxs" "16 16 32"

 

"editor_usage" "Healthpotion"

 

"spawnclass" "idItem"

"model" "models/darkmod/player_equipment/healthpotion.lwo"

"size" "32 32 32"

"inv_name" "Healthpotion"

"inv_health" "25"

"inv_item" "2"

"snd_acquire" "sound/sfx/tools/tool_pickup02.ogg"

"nopulse" "0"

}

 

entityDef darkmod_item_holywater

{

"inherit" "darkmod_item_default"

"editor_color" ".3 .3 1"

"editor_mins" "-16 -16 0"

"editor_maxs" "16 16 32"

 

"editor_usage" "Healthpotion"

 

"spawnclass" "idItem"

"model" "models/darkmod/player_equipment/holywater.lwo"

"size" "32 32 32"

"inv_name" "Holywater"

"inv_health" "25"

"inv_item" "2"

"snd_acquire" "sound/sfx/tools/tool_pickup02.ogg"

"nopulse" "0"

}

 

thats if you want to see them as frobable items, however there is no scripting at the moment to make

them work obviously, but they will hilight when you look at them.

Link to comment
Share on other sites

Even so, whether someone later has to make a separate def file for their new potion, or add it at the bottom of an existing 'potions' def file is hardly much of a concern.

Civillisation will not attain perfection until the last stone, from the last church, falls on the last priest.

- Emil Zola

 

character models site

Link to comment
Share on other sites

Hell a FM maker can just make a new def file containing his own potions. Realistically speaking all of the def files could be just one file (unless there's specific script calls or whatever for a particular file), they're mainly split for organization.

Link to comment
Share on other sites

just read this topic, the def file is to make the potions frobable, but the way the frob entity is setup seems

to me, that it can only be used by individual map scripts.

 

if activating a frob entity ingame could then use a scriptobject ( as an option ) then that type of frob entity

would be not dependent on any script map, and would be part of the darkmod system to automaticly add

to inventory or get used right away.. depending on the script.

 

actually.. that would be best for most types of frob items, such as gold.. ect.. so no map script is needed.

i was going to try to make a scriptobject to automaticly add up any gold/valuable items up but the way it works

now, it has to be scripted for a map, which means any map would have to have the same script added, when

doing such things should be a single scriptobject that covers it all, and all an fm mapper would have to do is

drop the item where they want in the map and not worry about the scripting part for it.

 

if you see what i mean...

 

like the darkmod doors.

 

but basicly.. if you add those def's to the darkmod item def file, you can select the potions from the menu in

the editor and place them where you want, and they can be frobable... but of course.. not added to inventory

yet, which has to be worked on still. you could make a script for your map to add them to inventory, but like

i mentioned, it would be better if you did not have to and had a scriptobject to cover that.

 

EDIT: screen showing the 2 potions selectable after adding the def files, and a potion normal then

frobbed.

 

potfrob19zn.jpg

Link to comment
Share on other sites

just read this topic, the def file is to make the potions frobable, but the way the frob entity is setup seems

to me, that it can only be used by individual map scripts.

 

That's going to be changed in the next alpha release AFAIK, frobbing things should check for local scripts first and then only check global scripts if it can't find the local one.

Link to comment
Share on other sites

Actually, you don't need to wait for that to be implemented to add frobable items, though you may want to change the scripts once local function calls are added.

 

Just make a global function for your object... For example:

object DarkMod_Item_Potion
{
void init();
void frob();

float myFunc( float blah );

float myVal;
};

etc

void DarkMod_Item_Potion_Frob( entity e )
{
DarkMod_Item_Potion p = e;
if (p)
	p.frob();
else
	sys.warning("Unable to cast entity to DarkMod_Item_Potion.");
}

Then you set the frobaction to "DarkMod_Item_Potion_Frob".

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...