|
METL!
#6137 posted by than on 2007/07/12 06:45:22
PLEASE add support for liquid brush types! I need that for my basemap which is having a few problems with Tyrann's tool, but I can't have glass+water if I don't use a skip removal tool.
Ah...
#6138 posted by metlslime on 2007/07/12 06:50:47
right, i forgot about that. So we want removal of *skip as well as skip, basically?
Hmm...
#6139 posted by metlslime on 2007/07/12 08:20:18
actually I guess i'd need:
*waterskip
*slimeskip
*lavaskip
*skip
for all three contents types, plus *skip when you don't want the water ambient sound.
Metlslime
#6140 posted by JPL on 2007/07/12 09:06:36
To make ambient sounds disappear ingame, just use aguirRe's vis tool: there are -noambient<lava/water/slime/sky> option that allow to remove them, check http://user.tninet.se/~xir870k/readmevis.txt .. It has been added since rvis 2.30 ;)
JPL:
#6141 posted by metlslime on 2007/07/12 09:19:49
i meant removing ambient sound for certain brushfaces, not the entire map.
Metl
#6142 posted by negke on 2007/07/12 19:14:03
Not necessarily. Since I use gl_clear myself, I will keep that in mind - some trigger_command trickery will probably do the job. Furthermore, software engines might be driven out by clever use of the limits.
Skip Progress...
#6143 posted by metlslime on 2007/07/12 19:59:07
I added entity support and liquid support last night.
Metl
#6144 posted by than on 2007/07/13 02:03:14
you are a god.
Does it have options so that only skip on entities may be removed? I have a feeling it was the removal of skip from world brushes that was causing the problem with Tyrann's tool, so it might be sensible to at least have an option to disable it if it starts to cause problems with your tool too.
Well...
#6145 posted by metlslime on 2007/07/13 03:20:32
no, but i'd rather try to actually fix the bug if we discover that my tool is buggy.
Of course if it turns out there's a bug I just can't figure out, adding that feature would be an option.
Than
#6146 posted by inertia on 2007/07/13 04:06:52
what is the method you settled on using to make glass?
Different Glass Solution
#6147 posted by ijed on 2007/07/13 04:17:10
I'm using glass at the moment under a Warp Version of Nehahara made by AguirRe - I failed to do this for warp through oversight.
I was reading through the documentation again and realised alpha could still be applied to any entity - func_wall glass. I haven't made it shootable yet but thats just a case of a snfx and trigger_once. And you can't spawn glass gibs because that's from the progs.
Wrappers
#6148 posted by Preach on 2007/07/13 04:27:06
I've got a few random thoughts for coding things in a simpler way, using wrappers on some of the built in functions, and before I forget them I figured I'd share. Putting it in mapping help because it doesn't belong anywhere else really.
The idea of putting wrappers comes from frikbot, at least that's where I saw it first. Entities that aren't players can't receive messages like centerprints. But instead of put exceptions for the bot in every weapon pickup, ammo pickup, etc, all the mod does is rename the function centerprint to centerprint_true, then make centerprint a function to check if the target entity is a bot, and send the message to centerprint_true if it's not. So the credit for the idea goes to Frikac.
The functions I'd put a wrapper on first are the precache functions, something like:
string(string s) precache_model_true = #20;
string(string s) precache_model =
{
if(framecount)
return "";
return precache_model_true(s);
}
This very simple wrapper doesn't run the precache if you've past the initial window, frame 0. In one fell swoop you've protected yourself from the game ending error that occurs when you precache things late.
This sounds like it's not much use in itself, because if the model isn't precached you're still gonna have problems if you try to setmodel, and you surely shouldn't be writing code that tries to.
Suppose though, that you were trying to spawn a key at some point in the game(that feature is done btw). It would be really nice to use the regular key spawn function item_key1, as it already does all the stuff you want it to. Plus if you ever update the code for the normal item_key1, you'd probably want to have the same changes applied to your later spawned key, so copy-pasting the code isn't ideal. But if you try to re-use the spawn code, the precaches end the game with a console error.
The first way to fix this would be to just add exceptions
if(framecount == 0)
precache_model ("progs/keymed.mdl");
to each instance of a precache, but the wrapper saves you a lot of time and effort. It does add an extra if statement to each precache you call, but that's a negligible effect, as it's only an extra load in the pre-game stages, and isn't called all that often even then. So I think it's a winner really.
So that's not precaching when you don't need to, but we can also go the other way. There's no need to take the risk of setting a model that isn't precached during frame 0, because we can precache it then. Rename setmodel to setmodel_true, and then add
void(entity e, string m) setmodel =
{
if(framecount == 0)
precache_model(m);
setmodel_true(e,m);
};
below precache_model. This allows you to write more compact spawn functions, you can setmodel directly without bothering to precache. Of course, you still need to precache any other models that might be needed in the course of the game, and any sounds, it can't do all the work.
The really useful part of this one comes from brush entities. Once you've made this change, you can add a point entity with classname, for instance, func_wall. Then give it a model field of "maps/shelf.bsp". Then you instantly get the ability to load the external model shelf.bsp into your map. This would allow you to create prefab func_walls that are used many times in your map, but only use up one precache. You could do the same thing by adding a precache_model(self.model) line to the func_wall code, but this way it works for all your brush entities, for free!
The saving of a few precache slots or lines of code may not seem that helpful on it's own, you might never need such external bsps. There's an idea I've been playing around with that would suddenly make this a much more useful tool, but I'll have to save it for another day(once I've coded/tested it). Hope there was something useful in this long, rambling post, have fun now!
Sounds
#6149 posted by ijed on 2007/07/13 05:00:25
Almost like you're thinking of a form of mapobjects there, Preach.
Rotating Brushes
#6150 posted by inertia on 2007/07/13 06:35:12
is there a way to do it that isn't weird and complex (like the original rotating stuff in the first expansion pack)?
Inertia
#6151 posted by than on 2007/07/13 07:02:42
I explained it in the basepack thread (or perhaps this one) already, but basically it involves using a liquid brush as the visible glass with an invisible (by using skip) func_wall for the collision detection. Using skip you can remove surfaces of any water brushes near the glass and create the impression that the water is butting up against the water.
The main problem is that it only works on gl engines and requires the user to set wateralpha, but using Quoth you can set it automatically when the map loads so it isn't a problem for my basepack map.
Another problem is that the water and glass will share the same level of transparency, but using lighting and fog intelligently around windows can hide this problem well.
Alternatively you can require Nehahara or whatever, but I'd rather try and support all GL engines and software if possible. The map actually loads fine in software, but you can't see through the glass. The only software engine that supports transparent water that I know of is tochrisquake. I am not sure if Bengt has added it to his SW engine or not.
Than
#6152 posted by inertia on 2007/07/13 08:32:08
ok thanks :D
Wrappers And Rotation
#6153 posted by Preach on 2007/07/13 12:18:52
So, the cunning application of the external bsp files is this: rotating entities. Once you have the two wrappers described in the last post set up, add the following entity to misc.qc
void() func_illusionary_rotate =
{
setmodel(self, self.model);
self.movetype = MOVETYPE_NOCLIP;
}
Now you can easily set up a rotating entity in your map. First thing is to make your rotating model. Start a new map, and make the object you want to rotate. The important thing to do is to make the origin of this new map the axis about which your object will rotate. Set up some lights around it, to match the area of map - you don't need to be too precise about this, since it's rotating you can't sensibly have one half shadowed and one half light. Just give it about the right levels. Then compile it and leave it in the maps directory.
Then you just add a point entity to your actual map, with classname func_illusionary_rotate, avelocity set to how you want it to rotate and model to the path to the bsp model you just made. Position it so the point entity is on the axis you want to rotate about. Nice and simple, and it avoids the difficulty aligning the textures and setting up those origin brushes or whatever hipnotic had you do.
Obviously this is a simple example, but you can use it as a base for the more complex rotating things. For instance it's not a solid entity, but quake can't do solids rotating without an engine fix, so anything you'd do would be some kind of hack. I'm sure it's possible to adapt the hipnotic hacks to this method. Hopefully soon I'll have one of my own hacks worked out, and I'll post that too.
Monster Count Issue On Reload....
#6154 posted by JPL on 2007/07/15 09:44:58
Copied from Base Pack thread: On my current project (I used Quoth) I have a weird effect when (quick)saving, and reloading the map. The monster count (at the end of the level) doesn't correspond to any of the skillset.. Any idea about this issue ??
Is it something that is Quoth related, or simply a Quake bug ? Or could it come from my map ?
Very Strange
#6155 posted by Preach on 2007/07/15 13:47:19
The total monster count is saved directly in the savegame file, you can see it by opening it as a text file. It might be that somehow the server and client parts of the game are becoming desynchronized, you have to do a bit of work to update the client if the total number of monsters has changed. It's possible that somewhere the client is getting a (correct) update to the number of monsters, but the server isn't. Then when you save the game, you're going by the server's record of things, so you run into problems.
Anyway, I'd have to see the map and the save file first, it's not a issue known to me before now.
This Is
#6156 posted by aguirRe on 2007/07/15 15:04:20
actually one of the most common bugs in many mods; monsters are being spawned, resurrected or killed without being accounted properly (via killed_monsters and total_monsters vars plus updating the client).
It can be pretty tricky to track down these issues, but in all progs that I've fixed, the killcount should (hopefully) be correct.
#6157 posted by necros on 2007/07/15 15:29:10
does DecodeLevelParms() get called when you load a save game? it might be messing up with left over data in parm11 and parm12...
Monster Count
#6158 posted by JPL on 2007/07/15 21:54:53
DecodeLevelParms(): Err, how can check its use ?
As far as I understood, it comes from the Quoth mod, so how is it possible nobody saw it before ?
#6159 posted by necros on 2007/07/16 01:00:03
nm, i checked and it can't be because of decodelevelparms.
Qc Help
#6160 posted by madfox on 2007/07/16 04:38:53
As I'm developping a new Quake1 monster I want to give it some crossed over functions. So I altered the demon fiend in a kind of tribolitus creature, gave it a new skin and now I'm working on a qc for it.
As far things went right (had 15 vertice meshes in 81 frames) and now I see the creature everywhere...but nevermind.
I wrote a qc, which is a mix of the demon fiend and the lightning bold of the shambler. I'm almost done, but the last vexing problem is that by imitating the shambler's blast the qc compiler keeps bumping on
shambler.qc:194:Castlightning redeclared
The creature.qc compiles right now but shammy not.
Is there a way to relay this message or is the Castlightning an unique statement in the qc. I mean can it only be used once?
Defining Functions
#6161 posted by lurker on 2007/07/16 07:48:20
If you copied and pasted the Castlightning code from shambler.qc with no modifications, try adding
void CastLightning();
to the very beginning of your new monster's .qc file. Then, delete the copied CastLightning code from newmonster.qc .
If you copied Castlightning but modified it, give it a new name like Castnewlightning in your new monster's .qc .
|
|
You must be logged in to post in this thread.
|
Website copyright © 2002-2024 John Fitzgibbons. All posts are copyright their respective authors.
|
|