Jump to content
The Dark Mod Forums

Newbie DarkRadiant Questions


demagogue

Recommended Posts

 

Try this ...

 

if ($player1.AI_INWATER < N)

{

blah blah blah

}

 

 

N can be one of these values:

 

#define WATERLEVEL_NONE 0
#define WATERLEVEL_FEET 1
#define WATERLEVEL_WAIST 2
#define WATERLEVEL_HEAD 3

 

So if I have this whole script:

#ifndef DIVING
#define DIVING
object divinghelmet : player_tools
{
  void init();
  void inventoryUse(entity userEntity, entity frobbedEntity, float buttonState);
  void toggle();
  void updateLoop();
  float inUse;
  vector black;
  float overlayHandle;
  float processing;

};

void divinghelmet::init()
{
  inUse = 0;
  black = '0 0 0';
  processing = 0;
  thread updateLoop();
}

void divinghelmet::updateLoop()
{
  while(1)
  {
    if(inUse)
    {
      $player1.heal("breath_potion", 1.0);
    }
    waitFrame();
  }
}

void divinghelmet::toggle()
{
  if (processing) return;
  processing = 1;
  if (inUse)
  {
     $fade_in.activate($player1);
     sys.wait(1.0);
     $air_valve.activate($player1);
     $trigger_timer_breath.activate($player1);
     $player1.destroyOverlay(overlayHandle);
     $fade_out.activate($player1);
     inUse = 0;
  }
  else
  {
     $fade_in.activate($player1);
     sys.wait(1.0);
     $air_valve.activate($player1);
     $trigger_timer_breath.activate($player1);
     overlayHandle = $player1.createOverlay("guis/helmet.gui", 100);
     $fade_out.activate($player1);
     inUse = 1;
  }

  processing=0;

}

void divinghelmet::inventoryUse(entity userEntity, entity frobbedEntity, float buttonState)
{
  thread toggle();
}
#endif

how I should modify it?

 

I was trying adding something like

float isInLiquid();

void divinghelmet::isInLiquid()
{
  while(1)
  {
    if(inUse)
    {
    sys.setcvar("pm_runspeed","0.9");
    }
    else
    {
    sys.setcvar("pm_runspeed","0.5");
    }
  }
}

But obviously I have no idea what I'm doing :) .

And water level check make more sense than super speed while only my feet are in water.

Edited by ERH+

S2wtMNl.gif

Link to comment
Share on other sites

Got more questions!

 

1. I have an area where I am using two fog lights, using the "fogs/basicfog" texture. The fog lights are placed adjacent to one another and the area where their radii intersect displays rendering errors. I am forced to use two lights because of how I constructed the map geometry. Changing the geometry now would be more work than its worth, so my question focuses on just the fog lights: Is there a way to have two adjacent fog lights without rendering errors where their radii meet? Is there perhaps a better solution than two adjacent fog lights?

 

2. I just added in-game map entities, which appear in the player's inventory. Those map entities are working fine, but for some reason there appears to be an additional map entity in the inventory, as well. I made sure not to have a superfluous or forgotten "atdm:map_of" entity, so what could be causing this problem? I also noticed that there is a line in the console stating "guis/map_of.gui" couldn't be loaded and I am unsure where that is coming from, since I have not explicitly created any entities demanding that gui definition.

 

3. Using Obsttorte's solution to the problem I had with the signs works fine. There is a problem with defining the line 'textalign "gui::gui_parm2"', however. I get an error message stating that an integer value is expected instead. I have resorted to hard-coding the value in the definition for now, but would like to know what I am missing to make the spawnarg solution work.

Link to comment
Share on other sites

Got more questions!

 

1. I have an area where I am using two fog lights, using the "fogs/basicfog" texture. The fog lights are placed adjacent to one another and the area where their radii intersect displays rendering errors. I am forced to use two lights because of how I constructed the map geometry. Changing the geometry now would be more work than its worth, so my question focuses on just the fog lights: Is there a way to have two adjacent fog lights without rendering errors where their radii meet? Is there perhaps a better solution than two adjacent fog lights?

 

2. I just added in-game map entities, which appear in the player's inventory. Those map entities are working fine, but for some reason there appears to be an additional map entity in the inventory, as well. I made sure not to have a superfluous or forgotten "atdm:map_of" entity, so what could be causing this problem? I also noticed that there is a line in the console stating "guis/map_of.gui" couldn't be loaded and I am unsure where that is coming from, since I have not explicitly created any entities demanding that gui definition.

 

3. Using Obsttorte's solution to the problem I had with the signs works fine. There is a problem with defining the line 'textalign "gui::gui_parm2"', however. I get an error message stating that an integer value is expected instead. I have resorted to hard-coding the value in the definition for now, but would like to know what I am missing to make the spawnarg solution work.

  1. Use particles instead the fog lights
  2. without the gui definition the map won't work. There should be a wiki article dealing with the setup. In addition you can check fms that are using maps.
  3. If the gui works anyways you can ignore the warning. Otherwise you would need a custom entity def that defines gui_parm2 as an editor_var. I never encountered this issue, though.

For more detailed information it would be helpful if you could post the console output here. If you type "condump anyname" in the console the console output will be written in anyname.txt stored in your darkmod folder. You can than upload the txt file here.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

This is a stupid question, and I know I'm going to kick myself lol

 

My map is installed into TDM and is showing as installed, however when I try to dmap it I get can't find the the map.

If I try to run the installed map, it tries to load grassdemo map which I looked at yesterday. I'm using some of the water

shaders used in that map and underwater models, so why is it doing this and how do I fix it?

 

I just know this is going to be a DOH moment lol

I have an eclectic YouTube channel making videos on a variety of games. Come and have look here:

https://www.youtube.com/c/NeonsStyleHD

 

Dark Mod Missions: Briarwood Manor - available here or in game

http://forums.thedarkmod.com/topic/18980-fan-mission-briarwood-manor-by-neonsstyle-first-mission-6082017-update-16/

 

 

Link to comment
Share on other sites

Change darkmod/currentfm.txt so it has your mission name in it.

 

It does have my mission name in it. This is what's puzzled me.

I have an eclectic YouTube channel making videos on a variety of games. Come and have look here:

https://www.youtube.com/c/NeonsStyleHD

 

Dark Mod Missions: Briarwood Manor - available here or in game

http://forums.thedarkmod.com/topic/18980-fan-mission-briarwood-manor-by-neonsstyle-first-mission-6082017-update-16/

 

 

Link to comment
Share on other sites

Where is the .map file?

map file is fms/venice/maps

 

Dark Radiant Mod (fs_game) is pointed there also. It should work. Ever since I looked at the grass demo level, it hasn't worked.

I have an eclectic YouTube channel making videos on a variety of games. Come and have look here:

https://www.youtube.com/c/NeonsStyleHD

 

Dark Mod Missions: Briarwood Manor - available here or in game

http://forums.thedarkmod.com/topic/18980-fan-mission-briarwood-manor-by-neonsstyle-first-mission-6082017-update-16/

 

 

Link to comment
Share on other sites

What Dark Radiant points to isn't relevant here. Does it say "Venice" on the title menu when you open TDM?

Link to comment
Share on other sites

What Dark Radiant points to isn't relevant here. Does it say "Venice" on the title menu when you open TDM?

 

Yes it does Spring, This is what makes no sense. I've been doing this for a year, I know how to do it, but this just

won't work ever since I loaded grassdemo. I did take some models and particles from the grassdemo level so the canals

would work better, ie give cloudy water and also some underwater plants.

Edited by NeonsStyle

I have an eclectic YouTube channel making videos on a variety of games. Come and have look here:

https://www.youtube.com/c/NeonsStyleHD

 

Dark Mod Missions: Briarwood Manor - available here or in game

http://forums.thedarkmod.com/topic/18980-fan-mission-briarwood-manor-by-neonsstyle-first-mission-6082017-update-16/

 

 

Link to comment
Share on other sites

I told you before grayman lol currenfm has mission name in it ie Venice (WIP name)

 

I tried renaming the mission, renaming the folder and the pk4, didn't work, and in the process of putting it back to the way

it was, I lost all the internal folders. So I lost all the work I'd done today. Fortunately it isn't a lot as most of it

was readjusting things rather than building.

Edited by NeonsStyle

I have an eclectic YouTube channel making videos on a variety of games. Come and have look here:

https://www.youtube.com/c/NeonsStyleHD

 

Dark Mod Missions: Briarwood Manor - available here or in game

http://forums.thedarkmod.com/topic/18980-fan-mission-briarwood-manor-by-neonsstyle-first-mission-6082017-update-16/

 

 

Link to comment
Share on other sites

Do you have the mission packed? In that case dmapping will probably not work. That is the only thing I can think of.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

It is both packed and not packed. The packed version was the last version I was satisfied with the build. The unpacked version is what I

am currently working on.

I have an eclectic YouTube channel making videos on a variety of games. Come and have look here:

https://www.youtube.com/c/NeonsStyleHD

 

Dark Mod Missions: Briarwood Manor - available here or in game

http://forums.thedarkmod.com/topic/18980-fan-mission-briarwood-manor-by-neonsstyle-first-mission-6082017-update-16/

 

 

Link to comment
Share on other sites

Try deleting the packed version. Than restart TDM and try dmapping again.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

That didn't work. What's more, all the folders in of the fms/venice which were there before I removed the pk4, after installing the mission again in tdm,

all those folders were gone after closing tdm. I'm talking maps, particles etc etc. Now they've all disappeared which is a bugger cause that loses all the work

I did today again. wtf?

 

I"m going to try reinstalling TDM something is dodgy here.

 

[Edit] Reinstalling didn't solve the problem, I still can't dmap my map, as it still says can't find it, even though currentfm.txt has my mission name in it, and

the mission has been installed in game under New Mission.

Edited by NeonsStyle

I have an eclectic YouTube channel making videos on a variety of games. Come and have look here:

https://www.youtube.com/c/NeonsStyleHD

 

Dark Mod Missions: Briarwood Manor - available here or in game

http://forums.thedarkmod.com/topic/18980-fan-mission-briarwood-manor-by-neonsstyle-first-mission-6082017-update-16/

 

 

Link to comment
Share on other sites

[unResolved] Still not able to Dmap my map due even though New Mission shows the mission installed.

 

Also, is there a way to have a switch available for Easy and Hard, but not for Expert? It's a light switch, and on expert it's

just too easy on what is supposed to be the most challenging part of the map.

I have an eclectic YouTube channel making videos on a variety of games. Come and have look here:

https://www.youtube.com/c/NeonsStyleHD

 

Dark Mod Missions: Briarwood Manor - available here or in game

http://forums.thedarkmod.com/topic/18980-fan-mission-briarwood-manor-by-neonsstyle-first-mission-6082017-update-16/

 

 

Link to comment
Share on other sites

You can set and change a lot of stuff depending on difficulty. Take a look at the Difficulty Levels Wiki page.

The stuff you want to do could be done either with a "diff_2_nospawn" "1" spwanarg (note that expert is difficutly 2) on the switch, which would remove it completely (or rather prevent it from spawning) for the expert difficutly, or you can use "diff_2_change_0" "frobable" and "diff_2_arg_0" "0", which would render the switch unfrobable for expert difficulty. I think the first option is the better one as it is easier to do and also a switch that is frobable on lower but not on higher difficulty may confuse players and be seen as a frobbing error. With the "diff_N_change" and "diff_N_arg" spawnarg pair you can basically change any spawnarg (e.g. light radii and targets for patrol paths), which gives a multitude of options for differences in difficulties.

Link to comment
Share on other sites

Thanks Destined, the first one is the one I was looking for. I knew I used it somewhere in the map but couldn't remember where lol. Briarwood Manor

uses many difficulty levels especially for controlling the light gem. This will sort it, I can release an update now to make it just a little easier on expert. :)

I have an eclectic YouTube channel making videos on a variety of games. Come and have look here:

https://www.youtube.com/c/NeonsStyleHD

 

Dark Mod Missions: Briarwood Manor - available here or in game

http://forums.thedarkmod.com/topic/18980-fan-mission-briarwood-manor-by-neonsstyle-first-mission-6082017-update-16/

 

 

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

    • 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.
      · 6 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
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...