Tremulous Forum

Mods => Modding Center => Topic started by: rotacak on September 06, 2007, 06:16:31 pm

Title: Building
Post by: rotacak on September 06, 2007, 06:16:31 pm
Hi,
I want try enable build like in screenshot below. It's easy/hard/impossible?
What I must change in source? Can someone help?

I know, this is bug in Uncreation, but I want try it in all maps (with jetpacks etc).

(http://rotaxmame.ic.cz/shot0020.jpg)

Another thing is enable build eggs on walls, OM on walls and ceilings etc.

Thanx for reply.
Title: Building
Post by: your face on September 06, 2007, 06:18:28 pm
whaaaa???  how did u do that?  thats awesome!!!!  can u do it w/out mods or anything?   :O
Title: Building
Post by: rotacak on September 06, 2007, 06:28:10 pm
Without mod. Take jetpack, fly upthere and build. If you found right place, buildings fall down. It's fun.
Title: Building
Post by: your face on September 06, 2007, 06:31:00 pm
ooo, kewl, ive gotta try that...
Title: Building
Post by: Overdose on September 06, 2007, 11:12:47 pm
Doesn't benmachine's mod allow you to build things on walls/ceilings?
Title: Building
Post by: rotacak on September 07, 2007, 02:34:15 am
Yes, but that is very big and complicated patch with many changes.

I can build egg on wall, but egg falls down :-( Can't found what I must change for function like acid/hive.
Title: Building
Post by: n00b pl0x on September 07, 2007, 03:10:01 am
being able to build eggs on walls would probably make the process of spawning from eggs even more buggy.
Title: Building
Post by: rotacak on September 07, 2007, 02:45:56 pm
Quote from: "n00b pl0x"
being able to build eggs on walls would probably make the process of spawning from eggs even more buggy.


Why? Eggs have square dimensions, so it's should be ok. If not then I just remove that. And "even more buggy"? Now it's buggy?

BTW, I found where to change it. It's in bg_misc.c file.

I still need help with first question.
Title: Building
Post by: ==Troy== on September 07, 2007, 03:25:33 pm
It is possible to build those on pretty much every map. You just need to be VERY accurate  with placement (decimal point of an angle if not less) and have 2 buildable surfaces in the proximity. for most maps it is not true, but for example on arachnid you can build so that the turrets fall down the vent above alien base. I cant do it with ping, but managed to get it working once on a local ;)

Oh and with the eggs, you are being spawned above the egg, not in the hitbox of it.
Title: Building
Post by: benmachine on September 07, 2007, 06:19:47 pm
The towering bug is, I think a consequence of this one:
http://bugzilla.icculus.org/show_bug.cgi?id=3305
Basically, under some rare circumstances, the place where the buildable tests are carried out is not the place where the buildable is... placed. And buildables placed in mid-air try to clamp to a surface by accelerating towards their base - in most cases, downwards. They come to rest against the floor below, or anything else below - you could probably get one to land on your head. Anyway, in summary this bug is probably still in SVN, not even the precise cause is known let alone the fix, but it can only occur in rare circumstances. Anecdotally, I've heard diagonal boundary lines help.

edit: what you'd have to do to allow this in normal play I'm not sure. Probably it'd involve changing tracemasks or the r.contents of some buildables so they appeared to the server similar to the structural brushes of the map.
Title: Building
Post by: rdizzle on September 07, 2007, 07:02:16 pm
you can do this on many angled surfaces.  e.g. the cannons in pushcannon.

of course, nobuild tends to solve the problem :P
Title: Building
Post by: yetshi on September 08, 2007, 10:13:09 am
so far ive been able to do that on every single map with the exception of atcs.

call it totempoling.
Title: Building
Post by: rotacak on September 08, 2007, 06:11:44 pm
Quote from: "benmachine"
Basically, under some rare circumstances, the place where the buildable tests are carried out is not the place where the buildable is... placed.


Yes, but this is not that case. All turrets are exactly there where they are :-)

Quote from: "benmachine"

edit: what you'd have to do to allow this in normal play I'm not sure. Probably it'd involve changing tracemasks or the r.contents of some buildables so they appeared to the server similar to the structural brushes of the map.


I think that is easy. But I am not C coder, so it's hard for me. Must be changed only one thing - allow build turret into air.

Now is detected place for buildable on map, if it's free place (square place with buildable dimensions), you can build.

If is other buildable on that place, you can't build.

But, it should be changed to: If is other buildable on that place, get what buildable it is, get their height and check free place on map floor coordinates + height blocking buildable (above that building). If it's free place, you can build there (practicaly in air).

That's all. But I don't know where and how add height number to checking place for buildable :-(

Sorry for my bad english.
Title: Building
Post by: techhead on September 08, 2007, 07:24:30 pm
On a tangent, someone should make a patch so that building models will not pass through map surfaces. Similar to building on a ledge so it looks like it falls down, its really annoying when the model sticks out of the map. Although this was designed so that buildings on angles floors and such will lie flat, this ideally wouldn't interfere with that function. If you want to see an example of this, build a turret on almost any railing. See Karith, Transit, Nexus 6, UTCS, SectorB17, or Meep if you can't find a railing.
Title: Building
Post by: kevlarman on September 08, 2007, 07:47:20 pm
Quote from: "techhead"
On a tangent, someone should make a patch so that building models will not pass through map surfaces. Similar to building on a ledge so it looks like it falls down, its really annoying when the model sticks out of the map. Although this was designed so that buildings on angles floors and such will lie flat, this ideally wouldn't interfere with that function. If you want to see an example of this, build a turret on almost any railing. See Karith, Transit, Nexus 6, UTCS, SectorB17, or Meep if you can't find a railing.
uh this has been fixed for ages.
Title: Building
Post by: techhead on September 08, 2007, 08:03:30 pm
Really?
Thats nice to know.
One last question: Is the fix client-side or server-side?
Title: Building
Post by: jal on September 08, 2007, 11:18:40 pm
12fps :(
Title: Building
Post by: n00b pl0x on September 08, 2007, 11:25:22 pm
Quote from: "rotacak"
And "even more buggy"? Now it's buggy?


where have you been

you can get outside of like 3 maps with eggs
Title: Building
Post by: benmachine on September 09, 2007, 12:04:29 am
Quote from: "n00b pl0x"
Quote from: "rotacak"
And "even more buggy"? Now it's buggy?


where have you been

you can get outside of like 3 maps with eggs


That's a map bug, not an egg bug.
Title: Building
Post by: kevlarman on September 09, 2007, 12:17:05 am
Quote from: "techhead"
Really?
Thats nice to know.
One last question: Is the fix client-side or server-side?
it's a cgame fix, so it's impossible to fix on pure 1.1 servers (the vast majority of servers), you will notice that you can't reproduce the bug on servers like trem.tjw.org that force you to download an updated cgame.
Title: Re: Building
Post by: Undeference on September 09, 2007, 08:04:09 am
Quote from: "rotacak"
Hi,
I want try enable build like in screenshot below. It's easy/hard/impossible?
What I must change in source? Can someone help?

I know, this is bug in Uncreation, but I want try it in all maps (with jetpacks etc).
You would basically remove a few lines from G_CanBuild() and change a line or two in BG_PositionBuildableRelativeToPlayer() too.

But why? Please tell me you intend to use this on server with massive build point and player counts...
Title: Re: Building
Post by: Plague Bringer on September 09, 2007, 03:28:59 pm
Quote from: "Undeference"
Quote from: "rotacak"
Hi,
I want try enable build like in screenshot below. It's easy/hard/impossible?
What I must change in source? Can someone help?

I know, this is bug in Uncreation, but I want try it in all maps (with jetpacks etc).
You would basically remove a few lines from G_CanBuild() and change a line or two in BG_PositionBuildableRelativeToPlayer() too.

But why? Please tell me you intend to use this on server with massive build point and player counts...
It's obviously a measure against the flying alien.
Title: Re: Building
Post by: rotacak on September 09, 2007, 05:18:38 pm
Quote from: "Undeference"
Quote from: "rotacak"
Hi,
I want try enable build like in screenshot below. It's easy/hard/impossible?
What I must change in source? Can someone help?

I know, this is bug in Uncreation, but I want try it in all maps (with jetpacks etc).
You would basically remove a few lines from G_CanBuild() and change a line or two in BG_PositionBuildableRelativeToPlayer() too.

Can you help me with that lines? I found that functions before, but I don't know how to change them.

Quote from: "Undeference"
But why? Please tell me you intend to use this on server with massive build point and player counts...

For fun. Builders can build more interesing creations and aliens can destroyed that easilly (chainreactions). It's something new in still same game. And if this will be unplayable, then is allways possible to remove it. Or make special vote for this.
Title: Re: Building
Post by: Undeference on September 12, 2007, 09:56:08 pm
Quote from: "Undeference"
Please tell me you intend to use this on server with massive build point and player counts...
that was sarcasm, btw. but apparently a 999 or so bp server allows building at weird angles (too bad they didn't let you stack stuff)

something like this:
Code: [Select]
Index: bg_misc.c
===================================================================
--- bg_misc.c   (revision 983)
+++ bg_misc.c   (working copy)
@@ -5216,7 +5216,7 @@
   //so buildings drop to floor
   VectorMA( targetOrigin, -128, playerNormal, targetOrigin );
 
-  (*trace)( tr, entityOrigin, mins, maxs, targetOrigin, ps->clientNum, MASK_DEADSOLID );
+  (*trace)( tr, entityOrigin, mins, maxs, targetOrigin, ps->clientNum, MASK_PLAYERSOLID );
   VectorCopy( tr->endpos, entityOrigin );
   VectorMA( entityOrigin, 0.1f, playerNormal, outOrigin );
   vectoangles( forward, outAngles );
Index: g_buildable.c
===================================================================
--- g_buildable.c       (revision 983)
+++ g_buildable.c       (working copy)
@@ -2781,13 +2781,6 @@
   minNormal = BG_FindMinNormalForBuildable( buildable );
   invert = BG_FindInvertNormalForBuildable( buildable );
 
-  //can we build at this angle?
-  if( !( normal[ 2 ] >= minNormal || ( invert && normal[ 2 ] <= -minNormal ) ) )
-    reason = IBE_NORMAL;
-
-  if( tr1.entityNum != ENTITYNUM_WORLD )
-    reason = IBE_NORMAL;
-
   //check there is enough room to spawn from (presuming this is a spawn)
   if( G_CheckSpawnPoint( -1, origin, normal, buildable, NULL ) != NULL )
     reason = IBE_NORMAL;
if you remove the "//check there is enough room" part, you might end up with people spawning inside walls and stuff which can be annoying
Title: Building
Post by: techhead on September 12, 2007, 11:58:50 pm
Once I hopped into devmap and dropped as many medistations as I could stack down the side of volcano, had some chain-reaction fun fun afterwards. Came out to around 1700, but lost the screenshot.
Title: Re: Building
Post by: soultcer on September 13, 2007, 04:12:59 pm
--
Title: Re: Building
Post by: rotacak on September 13, 2007, 11:12:46 pm
Quote from: "Undeference"

something like this:

Thank you very much. This is exactly what I need.

But there is one bug:
(http://img507.imageshack.us/img507/4868/bugqv5.jpg)

Hitboxes are on right place, but second armoury model (or any second model) is always inside first armoury model :-( Do you know why?

BTW, is possible transport variable from g_main.c to bg_misc.c? "extern  vmCvar_t  variable;" don't work.
Title: Building
Post by: Shadowgandor on September 21, 2007, 08:12:49 pm
this might be a noobish comment but couldn't you already build eggs on walls and ceilings???
Title: Building
Post by: CreatureofHell on September 22, 2007, 12:13:22 pm
Eggs, acid tubes, trappers and hives yes. Others: No.
Title: Building
Post by: benmachine on September 22, 2007, 12:37:37 pm
Eggs can only be built on ceilings.
Title: Building
Post by: Samurai.mac on September 22, 2007, 10:17:55 pm
Or sloped walls.
Title: Building
Post by: rotacak on September 30, 2007, 04:19:39 pm
Nobody know how to resolve that bug and the variable?
Title: Building
Post by: Death On Ice on September 30, 2007, 08:14:56 pm
-And walls and crates and scenery and pipes, etc. :wink:
Title: Re: Building
Post by: Archangel on March 11, 2009, 09:45:08 am
Now I know, this is a hell of a necro, but it directly follows an unanswered question of this thread, and the problem is current.

Is there any way to fix the stacking model collision bug without a qvm download? Can we re-align the BBOXes ?

On a related note, with this patch applied to a qvm, a friend of mine managed to build an upside-down telenode (i.e. spawn bits in the sky, blue stuff touching the floor) How the hell could this be possible without some sort of brush or similar for a buildable surface to have it to cling to? It was in ATCS, in human base, btw. Right in the center.
Title: Re: Building
Post by: Amanieu on March 11, 2009, 11:49:39 am
It simply reverses the buildable angles, basicly doing the same thing as upside-down eggs but for telenodes.
Title: Re: Building
Post by: Lakitu7 on March 11, 2009, 09:09:33 pm
If you mod things sufficiently to allow teles/eggs on walls, you still spawn above them, standing on top of the tele/egg bbox. Thus while you'd expect to spawn and fall down, you end up standing on top.

To do it right you need to modify the traces that determine spawn location relative to the egg/tele, in addition to the canbuild() mods that would allow placement there in the first place.