The "How do I..." Thread
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Re: The "How do I..." Thread
is it possible for Teleport_Line to not cause some kind of visual stutter even with entirely identical looking rooms on both ends of the teleporter? I viewbob is being reset perhaps but i'm not 100% what is causing it. (to clarify i want it to be non-obvious that the player passed through a teleporter)
- Jekyll Grim Payne
- Global Moderator
- Posts: 1118
- Joined: Mon Jul 21, 2008 4:08 am
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia (Modern GZDoom)
- Contact:
Re: The "How do I..." Thread
Well, it's not that simple, actually. Milkshape can generate the .qc file if you ask it to, but there's no standard template: there's a Quake III variant and a Half-Life variant. They look completely different. And moreover, GZDoom seems to ignore .qc files completely. I tried the Q3 one and it didn't work, even though I had all skin names and paths specified properly. Anyway, I solved my problem with sprites and textures eventually, because I simply needed some tall trees in the dark background, so it looks pretty fine now.Nash wrote:Milkshape 3D ships with a standard QC template that you can easily modify for your own needs if I'm not mistaken.Jekyll Grim Payne wrote:The problem is, my models came without the .qc file, but I guess I can make it myself.
I was wondering this myself, but it doesn't seem possible. You can keep the horizontal angle, but the vertical angle and the momentum are reset when crossing the teleport line. Just stick to using them inside hallways and don't put them over sloped surfaces or stairs, and it should be fine: players usually don't notice them.T-1 wrote:is it possible for Teleport_Line to not cause some kind of visual stutter even with entirely identical looking rooms on both ends of the teleporter? I viewbob is being reset perhaps but i'm not 100% what is causing it. (to clarify i want it to be non-obvious that the player passed through a teleporter)
Well, first of all, where are the files? If your mod is a pk3, and you simply put the decals inside a folder within the same pk3, then you should check the following things:cortlong50 wrote:so my main question is:
how do i direct the modeldef lump to the decals correctly?
1. obviously -- the model name (confusing that is not that uncommon), then the 'path' propertly (should specify the corret folder name within the pk3 where you have the models),
2. the sprite name -- AFAIK the actor that the model is attached to must use existing sprite names (as there's a model the sprite won't be rendered so it doesn't matter what you use, but it mustn't be a non-existing spritename),
3. the model height -- in a modelling program; make sure its Z is not below 0, otherwise it'd simplu appear underground.
Re: The "How do I..." Thread
I want my mod to change difficulty per level based on my health. I compiled this script
then added the name of it to the LOADACS lump but in game it doesn't work. Can someone tell me how to make this work?
Code: Select all
#include "zcommon.acs"
#include "zwvars.acs"
script 100 (int pos)
{
int health = GetActorProperty(0, APROP_HEALTH);
if (health < 400 && GameSkill() > 0)
ChangeSkill(GameSkill() - 1);
if (health > 400 && GameSkill() < 7)
ChangeSkill(GameSkill() + 1);
Exit_Normal(pos);
}
Last edited by Rowsol on Tue Jan 14, 2014 3:01 am, edited 1 time in total.
Re: The "How do I..." Thread
What's exacting script 100?
Re: The "How do I..." Thread
I don't know? lol, I finally figured out how to compile a script, that's the extent of my knowledge on the subject.
I would like to have the script reduce the difficulty level if I die or change it if I leave the level based on my health.
I would like to have the script reduce the difficulty level if I die or change it if I leave the level based on my health.
Re: The "How do I..." Thread
The latter is simple, as there is infact a level exit trigger that scripts can be told to use. You can change your script to an UNLOADING script type, like so:
The former, on the other-hand, is impossible. Skill only properly sets on map change. It also doesn't work in single-player at all, as respawning after dying will resume from the players last save.
Code: Select all
script 100 UNLOADING
{
int health = GetActorProperty(0, APROP_HEALTH);
if (health < 400 && GameSkill() > 0)
ChangeSkill(GameSkill() - 1);
if (health > 400 && GameSkill() < 7)
ChangeSkill(GameSkill() + 1);
//We don't need to call the exit trigger anymore, as that is happening anyway.
}
Re: The "How do I..." Thread
It works!!!! Thanks so much man.
Well, I thought it was. It's dropping the skill level no matter what my health is....
God this is frustrating.
Well, I thought it was. It's dropping the skill level no matter what my health is....
God this is frustrating.
- Jekyll Grim Payne
- Global Moderator
- Posts: 1118
- Joined: Mon Jul 21, 2008 4:08 am
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia (Modern GZDoom)
- Contact:
Re: The "How do I..." Thread
Well, first of all, make sure that the activator of the script is the player, because the script checks for the activator's health. If it's the UNLOADING script, the activator is the player (I think), but if it's a (void) script or any other type of script, the activator can be anything (By the way, I'm not sure about the meaning of 'int pos', but I don't know much about scripting).Rowsol wrote:It works!!!! Thanks so much man.
Well, I thought it was. It's dropping the skill level no matter what my health is....
God this is frustrating.
Secondly, I think it'll be cleaner if it looks like this:
Code: Select all
Script 100 (int pos)
{
int health = GetActorProperty(0, APROP_HEALTH);
if (health < 25 && GameSkill() > SKILL_VERY_EASY)
{
ChangeSkill(GameSkill() - 1);
Exit_Normal(pos);
}
if (health > 100 && GameSkill() < SKILL_HARD)
{
ChangeSkill(GameSkill() + 1);
Exit_Normal(pos);
}
else
{
Exit_Normal(pos);
}
}
Re: The "How do I..." Thread
How does some mods multiply the enemy numbers without breaking the game, like Brutal Doom and Project MSX?
Re: The "How do I..." Thread
That's not how you do it. You generate a Quake 3 QC (since we are working with the MD3 for after all, which is from Quake 3), edit the skin paths in QC, THEN finally export the MD3. Milkshape will embed the paths you specified in the QC into your final MD3, so you don't need to use Npherno's tool. The QC file is irrelevant at this point and is not meant to be used by GZDoom.Jekyll Grim Payne wrote: Well, it's not that simple, actually. Milkshape can generate the .qc file if you ask it to, but there's no standard template: there's a Quake III variant and a Half-Life variant. They look completely different. And moreover, GZDoom seems to ignore .qc files completely. I tried the Q3 one and it didn't work, even though I had all skin names and paths specified properly.
Of course if you don't want to bother with the QC files, that's fine too; just export the MD3 as-is and use Npherno's tool to fix the skin paths after the fact.
- Jekyll Grim Payne
- Global Moderator
- Posts: 1118
- Joined: Mon Jul 21, 2008 4:08 am
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia (Modern GZDoom)
- Contact:
Re: The "How do I..." Thread
The simplest idea that comes to mind is to create a decorate Actor that replaces the enemy and spawns monsters around. Not so difficult via A_SpawnItem or one of many other spawning commands.LostSkull wrote:How does some mods multiply the enemy numbers without breaking the game, like Brutal Doom and Project MSX?
Re: The "How do I..." Thread
No, you are wrong. If we are talking about UNLOADING script it is loaded after you exit the level.If it's the UNLOADING script, the activator is the player
So it means that using UNLOADING scripts makes sense only if there is at least one hub in your wad. Without hubs you cannot return to a previous level even if you use [wiki]Teleport_NewMap[/wiki]. Unless you use the RememberState flag in mapinfo.If the script needs to wait, it will continue execution when the players return to the map.
edward850's UNLOADING script lacks [wiki]SetActivator[/wiki] because the default activator is the world as I mentioned before. So I guess the return value of this function:
Code: Select all
GetActorProperty(0, APROP_HEALTH);
And anyway, if you have a conditional statements like that then you don't need to write the same action special on every branch of the if-else statements:
You can use this instead:
Code: Select all
if (health < 25 && GameSkill() > SKILL_VERY_EASY)
{
ChangeSkill(GameSkill() - 1);
}
if (health > 100 && GameSkill() < SKILL_HARD)
{
ChangeSkill(GameSkill() + 1);
}
Exit_Normal(pos);
Re: The "How do I..." Thread
You'd know if you looked at [wiki]Exit_Normal[/wiki] on the wiki.Jekyll Grim Payne wrote:(By the way, I'm not sure about the meaning of 'int pos', but I don't know much about scripting)
If you have ever played Hexen (or Strife) you must have noticed that when you enter a map from a [wiki]hub[/wiki], you do not always appear in the same spot. For example, on Seven Portals, you only appear in the little Korax taunting room if you come from Winnowing Hall, when you come from Guardian or Ice, Guardian of Fire, Guardian of Steel, or Bright Crucible, you appear on a different position.
That's how it works. Each player start has a pos value in their first arg, and they only work when you enter the map from an exit action with the same pos value.
Here's a fun thing you can do: create a map in Hexen or UDMF format, put some value on the player 1 start so that its arg0 isn't 0, then marvel at how ZDoom will tell you the map does not have a player start when you try to warp to it... There is a player start, it's just not set for position 0.
Re: The "How do I..." Thread
Now I understandJekyll Grim Payne wrote:The simplest idea that comes to mind is to create a decorate Actor that replaces the enemy and spawns monsters around. Not so difficult via A_SpawnItem or one of many other spawning commands.LostSkull wrote:How does some mods multiply the enemy numbers without breaking the game, like Brutal Doom and Project MSX?
Re: The "How do I..." Thread
This is also true for almost everything related to ZDoom. If someone knows the vanilla Hexen well, then it's not a surprise to see what ZDoom is "capable" of.If you have ever played Hexen
Once someone said here that you can create a Hexen map in doom format, but since then I haven't found any possible reason for that. Why would someone do that?