News | Forum | People | FAQ | Links | Search | Register | Log in
Mapping Help
This is the place to ask about mapping problems, techniques, and bug fixing, and pretty much anything else you want to do in the level editor.

For questions about coding, check out the Coding Help thread: https://www.celephais.net/board/view_thread.php?id=60097
First | Previous | Next | Last
Phait 
The engine crash bug loading the System4 gfx.wad is caused by a texture anum_0 with invalid dimensions. You can see this also by loading the wad in TexMex; it will refuse to load that texture. Many GL-engines will crash in this situation, but DarkPlaces (Oct 2004) reports correctly.

I've now added checks and messages with texture name to my engines.

As for the onlyents issue; just run:
qbsp -onlyents mapname.ent

If you don't specify extension, qbsp will look for the default extension .map and in this case, it doesn't contain the new changes.

OTOH since I assume that you have the map source, I'd recommend change that instead and rebuild, instead of using the BspInfo method. Use that only if you don't have the source. 
AguirRe 
Thanks very much for your help :) 
Actually AguirRe 
Are you sure? Because I loaded the wad in Tex Mex, and anum_0 shows just fine. It's CONCHARS that never loads (whether in my wad or id's original wad). 
Nevermind 
I replaced my modified anums with the original and it now loads. I won't doubt you ArguiRe ;) 
No, You're Right 
I misinterpreted TexMex' behaviour a bit. The wad is still invalid (including the anum_0 tex report from the engine) but as you say, it's the conchars tex that's not loaded.

After checking some more, I think I have an idea what the problem is. I read somewhere that the original gfx.wad is in fact invalid because they made some hackish addition to the wad and patched the header. This is why TexMex has problems loading the wad. You can check loading e.g. the Hipnotic gfx.wad instead and it will load properly.

However, there's also another problem. You seem to have created these new objects as mip textures (with mipmaps) and that's wrong. They should be StatusBar Pictures instead and definitely without mipmaps.

I've tried to figure out how to convert an existing mip texture to a StatusBar object (i.e. remove the mipmaps) but haven't had any success yet.

Maybe someone else knows how to do this? 
MIPs 
That my graphics have become MIPs is involuntary. What I did was export all the graphics to .PCX, opened in Photoshop and edited there. Then, whichever ones needed to be .LMP were converted. The ones inside GFX.wad were merely imported .PCX files. How they got turned into MIPs, dunno. Must be automatic. 
There Was An Old Program Called QArt That Would Do That. 
Dunno where one would get that nowadays tho... 
The Adquedit Solution 
Use the evil folder deleting tool (or Adquedit) for importing into your gfx.wad. It should always save it correctly, it accounts for the wierdness of the conchars file and all that automatically. 
Preach 
I have decided to use the 'sinking' monster route to get rid of my corpses.

I have created a simple SUB_Corpse_sink that lowers the origin_z value a unit at a time and lowers my corpse until it is out of sight. I then use remove(self). It works so far.

However, if I quickly no_clip to the floor below, I can see the corpse appear through the ceiling before suddenly disappearing altogether.

I am thinking that if a monster is on a walkway above the player and is then killed, the player could see all this happening. Is there a way to get the player to sink into the 'ground' by (effectively) removing it in layers. I have in mind a pack of cards that I keep removing the bottom card until the pack has gone.

I have seen this sinking effect in Lost Chapters although I do not know how it is achieved there. 
Mike 
The corpse removal in Chapters works exactly as you appear to have implemented it yourself. If you check out any monster that dies on a walkway in Chapters ( the ogre above the GL in chapter_secret for example ) you'll see his corpse sink through the wooden boards and turn black before disappearing.

Preventing the model showing through is basically impossible in Quake as far as I can tell.
Trying to skim the bottom off the model like a deck of cards would require that the polys be rendered individually and relative to world polys, which Quake simply doesn't do. I think that would need an engine mod. DP could maybe do it.

re: chapters progs. No word from necros, guess I'll have to email him again. Unless he responds here. 
Kell 
OK, thanks. I'll carry on the way I'm going. 
Stopping It Showing Through - There Is A Way, Kinda 
What you could do is make an extra animation sequence where the model itself sinks down, but that any vertex that is more than 2 quake units below the floor gets flattened. That way nothing would show through a floor more than 2 quake units thick. Of course, doing that kind of animation wouldn't be smooth on an engine without interpolation, so perhaps what you want is to move the model down as you animate it, flatten the vertices at -2, undo the motion downwards, then code it to move at the same rate you originally animated it at. Urrgh. But it should would.

Except...this kind of calculation is assuming the corpse is on a single flat surface. None of this would be valid on a slope. There would be work arounds to minimise that problem, like doing a traceline down, and using the trace_plane_normal to calcluate how far to put it down before playing the animation. And nothing you can do will help if the corpse hangs off the edge of a ledge. So yeah, it's never gonna be great, but it could work better 
Would = Work 
nt 
Kell Or Necros 
I have tried to use the vermis from lost chapters in one of my maps.
It looks like the vermis dosn't respond to the flags 'delay spawn'. Since it is a void map the vermis is visible all over the map.
Is this a bug or haven't you given the vermis the spawn- delay/silent/alert flags? 
On Shortages Of Entities And The Like 
I'm working on a mod to help people who are pushing the limit of entites in maps. So far I've got rid of all info_player_starts, up to 16 of each of info_player_deathmatch, info_player_coop and info_intermissions. The entites are loaded in the map, but then the position/facing of each is stored in memory and the entites freed up.(thanks to the natural selection mod team for the idea of doing this, they do a similar thing to keep their mod running in half life). At this point I'd like to express my dislike for the original quake mappers who used info_player_starts as teleport destinations, it complicates the removal code.

Speaking of teleports, the mod also gets rid of info_teleport_destinations, by a similar method. Since you have another entity to store the location of the destination in, namely the trigger_teleport that sends you there, the method works for any number of teleports in a map. This is all automatic, build the teleport as you usually would and the mod does the fix. I'll probably get round to adding the teleporting monsters by a flag code soon.

I'm also hoping to add a few options for corpse removal. The options should be setable in worldspawn, and possibly per monster as well(overriding the general level preference). The options I'm considering are:

Never remove corpses(current behavior)
Remove corpses when running low on entites
Remove corpses when running low on entites, but attempt to make static corpses first.
Always remove corpses after x seconds

along with
Fade away on removal
Sink away on removal
Burn away(think doom3) on removal


The remove when running low on entites needs a bit more explanation. I now have an entity counter running in the mod, that will know when there are few entities left, and when you get close to the limit, the mod will start removing 'expendable' entites. This includes things like explosions, flying lavaballs(although not the spawners) and if you set the flags to do so, corpses. Corpses would probably be the only things to have an effect applied when removed, the others would just disappear. The list of expendable entites would be adjustable, so if you felt backpacks belonged on there, or had rubble spawned from an explodewall you added, then this could be made expendable.

The static entites for corpses is something else I just came up with. There are three reasons why you wouldn't just make every corpse static. One is that, in deathmatch, corpses disappear after a while, so they aren't static, although this only applies to players. The second is that there are only 127 static entities available, and some are already used for torches. The third is that sometimes corpses aren't static, for example if they are on lifts they should move.

The second problem is easy to fix, you keep track of how many static entities you make and stop once you reach 127. I thought the third wasn't fixable, but then I discovered a poorly documented feature in defs.qc - .groundentity. It tells you which entity another is resting on. So wait for the entity to land, then any that land on world can be made static safely.

The final thing is that freeing up entities afterwards isn't much help if you don't use them again. Some of them will be useful for projectiles and the like. To really take advantage of them though, I'll add group spawners like kinn did in Bastion, so you can spawn many monsters from a single entity 'in formation'. You'd have to make sure that enough monsters were killed in previous sections, but then it should work alright.

So, is there a demand for a mod like this? Or anything else that belongs in the project? The scope of it is making it easier to map/work around limitations in the engine without changing the gameplay. Like adding the option to set a player's starting ammo/health/armour/weapons from the spawn point, rather than putting entities on top of the spawnpoint to achieve the same effect. 
Preach/Kell 
Well, what I thought was working last night, was not working last night as I thought!

With a SUB_Corpse_removal added to subs.qc I had what I thought was a nice gentle sinking of the monster: it looked real good. What I didn't realise at the time was that it continued sinking... on and on throughout the map.

When I introduced a SUB_Remove it removed the monster but so fast that you didn't see the sinking action.

What I have ended up with is this after the final monster death frame:-

{
if (!self.corpse_delay) // if no corpse delay set in map
self.nextthink = time + 120; // remove after 120 secs anyway ( may not want this???)

else
self.nextthink = time + (self.corpse_delay); // remove after corpse_delay seconds

{self.think = SUB_Corpse_sink;}

};


And this as the new SUB:-

.float counter;
void() SUB_Null = {};
void() SUB_Remove = {remove(self);};

void() SUB_Corpse_sink =
{
self.counter = 0;
{while (self.counter < 16)
{
self.origin_z = self.origin_z -(1);
self.nextthink = time + 0.1;
self.counter = self.counter + 1;
}

self.think = SUB_Remove;
}
};

The counter was supposed to give me a 'sink' of 16 units. Adjusting the nextthink time has no visible effect.

Are you able to spot my newbie mistake here? 
The While Loop 
the while loop runs until it is finished. It doesn't pause at the nextthink line. What you should do is change the while to an if, and then put a return; after the self.counter = self.counter + 1; line.

Also, try to reuse an unused entity field instead of adding a new one. (.counter.) I believe there's a .count and .cnt field that monsters don't use.

Finally, you might have to call setOrigin on the monster, because I'm not sure the direct origin change is reflected in the game. 
Oh, And. 
Move the line self.counter = 0; to somewhere it isn't called everytime SUB_Corpse_sink is called. As it is now it is reset every time the function is called and the monster sinks forever. 
And Furthermore; 
Add a self.nextthink = time + 0.1; before the final self.think = SUB_Remove; line. self.nextthink is already at time when it gets there. 
Czg 
Thanks, I'm on to it right away. 
Czg 
All done and working. Thanks.

I haven't altered the origin changing as I had already seen that that part was OK.
I had already been down the 'if/then' route but the two main errors were: resetting the counter wrongly, and the missing self.nextthink before the SUB_Remove.

Once again, thanks. Now, back to mapping... 
.cnt Warning 
I thought .cnt was a nice safe field for monsters, I was wrong. It's actually used for checking the refire rate in nightmare skill. So it's probably safe to use here once the monster is dead, and won't cause terrible problems if you use it for storing properties like spawnflags(it'll get reset after one pass through the ai system - at most two shots). But don't use it for something that needs to persist throughout the lifetime of the monster, or it'll break in skill 3. A few safer fields for monsters are

.worldtype (only used by the world, a total waste in the original code)

.light_lev and .style (only used for lights, and even then mostly for the compilers)

Nearly any of the player only fields are safe for storing things, although super_damage_finished does actually work on monsters apparently(this field is how long quad damage lasts). Confusingly enough, .count works fine on monsters, as it's only used for triggers. 
Entity Fields 
What are the points against using new entity fields?

As a by-the-way Preach, 'style' is already in use via your teleporting monsters routine. 
On The Origin Of Species 
Well, of models anyway.

Following-on from some previous postings, I still couldn't figure out the origin of the model and how to calculate the bounding box for the editor. In addition, I had noted the some models required to be off-set in the editor to appear correctly in-game, which I find quite annoying.

So, a couple of points have now just sunk in (it's his age doctor, his age), and being the kindly benefactor that I am (as long as money is not involved), I will share with... well, anyone else who couldn't figure it out (unless I am the only one. Mmmm, that would make me totally unique :-)

One, the model's origin is set by the model editor (I am using Qme).

Two, the origin is at 0,0,0 in the editor view

Three, beware (and this is why it took me so long to work it out) there is an Eye Position in the editor that can enable the model to be viewed off-origin but without altering the origin.

Four, the upper and lower box bounds shown in the Model Properties window are correctly shown relative to the origin, regardless of the Eye Position. This is vitally important when placing light sources.

So it boiled down to not realising that there was an Eye Position and that if one had been set, the origin was not as it appeared to be in the Frame Editor window.

All of this means that I can now place my models correctly. Phew! 
Preach's Experiments Into Advanced Entity Hacking 
Now, the logic gate thing is very nice and all, it's very flexable and all, but it's a bit of a hack, and the fact that the projectile has to move a distance means you'll never get an instant reaction. So, if you want to know a way to do a simple trick - having a trigger that you can't touch until you fire another trigger to activate it - using the bare minimum of entities, read on.

The switchable trigger starts life as a info_notnull, that most versatile of quake entity. The whole thing hinges on making one that is not a point entity, but a brush entity(in fact, the brush should be the trigger you desire once it's switched on). There may be an easy way to do this if you mess with your config files for the editor, but I did it by hacking the entities with adquedit. The way to do that is to create a point entity info_notnull with the required properties, and a trigger_once with the required size. Then, use adquedit to extract the entities, and open the ents file in notepad.

Then find the trigger_once, and copy the "model" line. Paste said line over the origin for the info_notnull, replacing it completely. Then delete all the lines about the trigger_once, you don't need it.

So, what properties do you have to give the info_notnull? Basically these:
{
"model" "*2"
"touch" "multi_touch"
"use" "InitTrigger"
"target" "door1"
"targetname" "activatetrigger"
"wait" "3"
"classname" "info_notnull"
}


Quick explanations. The model is what we just hacked to make it a touchable thing. The touch is the same touch function as a trigger_multiple - but the info_notnull initially has no size, and so can't be touched, until you fire InitTrigger, in the use slot. The target and targetname are pretty obvious. Wait works the same as normal, set it to -1 to get a trigger_once.

You can also set noise directly here to the wav file you want to play. Bear in mind that it won't get precached by this entity, so you must make sure there's another entity in the map that uses and precaches this sound, even the regular trigger sounds. Most trigger_multiple stuff should just work, except targetting the trigger with another event. Since you have to target it with an event to make it a touchable trigger, targetting it again doesn't do anything.

One more thing to note is that this isn't a toggleable thing. It starts off, you can turn it on, and if you killtarget it you can turn it off again, but that's it. The only solution so far to a proper toggle would be a logic gate, but I'll work on it. There are lots of...interesting hacks you can do with an info_notnull, including a wall mounted ammo dispenser, (kinda reusable) gib fountains without telefrags, teleport flashes, and the classic explosion hack. Maybe I should put a page up about 'em or something. 
First | Previous | Next | Last
You must be logged in to post in this thread.
Website copyright © 2002-2024 John Fitzgibbons. All posts are copyright their respective authors.