Jump to content
The Dark Mod Forums

Recommended Posts

Posted

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.

Posted

We should not have a darkmod_item_healthpotion.def. If any it should be darkmod_item_potion.def, or do we ant to have individual files per potion type? I don't think this is neccessary, is it?

Gerhard

Posted

That's not the point, because others may be added later. We should not think in the limited scope our mod, because this is exactly the way how TDS got developed. "We don't have to care for X because once it is out in the shops it's over".

Gerhard

Posted

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

Posted

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.

Posted

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

Posted
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.

Posted

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".

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

    • JackFarmer

      "The Year of the Rat." 
      😄

      Al Stewart must be proud of you!
      Happy testing!
      @MirceaKitsune
      · 1 reply
    • datiswous

      I posted about it before, but I think the default tdm logo video looks outdated. For a (i.m.o.) better looking version, you can download the pk4 attached to this post and plonk it in your tdm root folder. Every mission that starts with the tdm logo then starts with the better looking one. Try for example mission COS1 Pearls and Swine.
      tdm_logo_video.pk4
      · 2 replies
    • JackFarmer

      Kill the bots! (see the "Who is online" bar)
      · 3 replies
    • STiFU

      I finished DOOM - The Dark Ages the other day. It is a decent shooter, but not as great as its predecessors, especially because of the soundtrack.
      · 5 replies
    • JackFarmer

      What do you know about a 40 degree day?
      @demagogue
      · 4 replies
×
×
  • Create New...