A code limitation that has annoyed players since 1.00 is that roofs cannot be destroyed. This is especially jarring when the rest of the building has already been destroyed, leaving a floating platform that defies gravity and common sense.
I've corrected that. Explosions near walls, or on the roof itself, can collapse portions of it.
A soldier on a collapsing roof tile will fall down and take damage.
A soldier below a collapsing roof tile will take damage from the debris.
How many roof tiles collapse depends on the strength and distance to supporting walls.
If no supporting wall is found, the entire ceiling comes down.
Some heavily armoured roofs (in, say, a secret research facility) cannot be collapsed.
For demonstration reasons, Red wounds Buns with maximum collateral damage, and Bob makes a few holes into a factory full of childrenBeta Testers:
&feature=youtu.be
One new item was added for this, item #1727 (Roof Collapse) with the tag <ItemFlag>268435456</ItemFlag>. This is required for internal reasons. Any mod wishing to have this feature requires this item and the connected entries in Explosives.xml and ExplosivesData.xml.
A new sound and a new animation are also needed.
It is easily possible to add better animations, or even animations to collapse multiple tiles at once. Knowing the community however, nobody will ever do this.
No, this will not go into any 2014 stable release patches.
If we now teach the AI to use explosives differently, we might have a good counter to the cheap tactic of camping on rooftops :crossbones:
This has been added to the trunk in r7614 and is fully savegame compatible. GameDir >= r2174 is required, as new animations and sounds were added. Using a lower GameDir will cause penguins to apply to the police academy.
Messages:344
Registered:July 2006 Location: France
My jaw just dropped off...
You prove once again that Flugente is synonymous of miracle, the impossible made true, but man made! (is he?!)
The animations and sound are decent placeholder. However, i wish i could help you on those and the other artistic requests, but i'm total crap at this. When Tox's STI editor reaches a final state, i'll have a try at it and see if i can do something decent. Hopes are low though.
Thanks for unlocking another span of gameplay.
PS : what about the other roofs, the non flat ones with elaborate rooftops? Do they break and fall too?
Messages:69
Registered:December 2001 Location: Oregon, USA
Is there anything you CAN'T perform a miracle on besides that which is outside the limits of the engine, code & the thing Sirtech never thought of? : )
I think the animations and sounds are really good TBH; reminds me of collapsing floors in Prince of Persia.
The AI could be made to prefer lobbing grenades over shooting at close range when your mercs are on a roof; this would really dramatically alter gameplay for the better.
Thanks Flugente! This is a really awesome feature that I have always wanted.
I highly doubt that unless Flugente wants to recode the whole game which is build upon the two levels.
Maybe try to do Flugente maybe not.
I still believe that in the end will be someone or group who will start this topic.
This is something that can JA2 fantastic second life (new and fresh).
I waiting for a reply on the forum BP: I / we have made two new levels.
Un-fucking-believeable what you can do with this old code Flugente!
The amount of new features you are constantly adding makes me question if you really are just one single person!
Now if you'd take that talent and care to JA:F, that game might even yet have a chance to get nearly as good as 1.13 is now, in a couple of years time!
Un-fucking-believeable what you can do with this old code Flugente!
The amount of new features you are constantly adding makes me question if you really are just one single person!
Now if you'd take that talent and care to JA:F, that game might even yet have a chance to get nearly as good as 1.13 is now, in a couple of years time!
I can witness that he is only one person. Amazing, isn't it?
The amount of new features you are constantly adding makes me question if you really are just one single person!
I think you're onto something here, Mauser...
FLUGENTE IS THE ENTIRE SIRTECH TEAM!!! The secret is out! He's Ian Currie and Shaun Lyng and Camfield and all. Working secretely @ v1.13!!! :professor: :doctor: :geek3:
And of course, he's Santa (in his spare time). :magician:
Un-fucking-believeable what you can do with this old code Flugente!
The amount of new features you are constantly adding makes me question if you really are just one single person!
Now if you'd take that talent and care to JA:F, that game might even yet have a chance to get nearly as good as 1.13 is now, in a couple of years time!
I can witness that he is only one person. Amazing, isn't it?
Maybe They just sent us one guy to keep up the cover story?
I have a minor bug report: mercs can walk on rooftops that have collapsed (they appear to be levitating). They do crash to the floor during the collapse though, which is very cool.
Also, these Arulcan roofs are really shoddy, exactly as expected
1. short
2. a bit longer
3. a combination of 2 and original sound
4. a combination of 2 + wood debris
5. metal roof
6. crisp wood collapse
7. more metal roof crash
Okay... I managed to get it working in AIMNAS. Pretty nice feature. :pitchfork:
Not sure if it is intended that a single handgrenade (even a small M67) can bring down an entire roof (and the building with it). Seems a bit overpowered.
I already powered it down quite a bit compared to stock 1.13 (1.13 values in parenthesis):
Damage 5 (10)
Stun Damage 5 (10)
Volatility 0 (2)
Final Radius 1 (1)
Mag Size 1 (1)
Fragments 5 (70)
Frag Type Ball small (Ball)
Frag Damage 5 (22)
Frag Range 5 (100)
Horz Degree 60 (60)
Vert Degree 2 (2)
Directional yes (no)
Result: Small grenade thrown on a roof on a 8 x 11 building brings down the complete roof.
I'd say this is still too good... A grenade should have a chance to damage the roof (not automatically destroy it 100% of the time), and not bring down the entire thing.
Tests were made on flat roofs and regular slant house roofs.
Okay... I managed to get it working in AIMNAS. Pretty nice feature. :pitchfork:
Not sure if it is intended that a single handgrenade (even a small M67) can bring down an entire roof (and the building with it). Seems a bit overpowered.
I already powered it down quite a bit compared to stock 1.13 (1.13 values in parenthesis):
Damage 5 (10)
Stun Damage 5 (10)
Volatility 0 (2)
Final Radius 1 (1)
Mag Size 1 (1)
Fragments 5 (70)
Frag Type Ball small (Ball)
Frag Damage 5 (22)
Frag Range 5 (100)
Horz Degree 60 (60)
Vert Degree 2 (2)
Directional yes (no)
Result: Small grenade thrown on a roof on a 8 x 11 building brings down the complete roof.
I'd say this is still too good... A grenade should have a chance to damage the roof (not automatically destroy it 100% of the time), and not bring down the entire thing.
Tests were made on flat roofs and regular slant house roofs.
Any idea what's going wrong or is it intended?
When collapsing a roof, I loop over all connected roof tiles and check whether there is a wall beneath. If there is, I remember its armour value. The maximum of these then counts as the armour of the roof. If damage > armour, or damage > (distance to source of explosion) * armour, collapse the roof.
Perhaps the armour values of these walls are very low? I got it to work with AIMNAS yesterday and had no such issues.
Constructing a wall (AIMNAS) and then destroying it collapses overhead roof tiles. Deconstructing would work similar (it also damages the roof). However, for roof collapsing I check for the structure flag WALLSTUFF, while for deconstructing I check for GENERIC and WIREFENCE. So this would only work for walls that have both flags, not sure if you have any of those.
I will answer the rest of the questions raised in this thread when I'm back from work.
Messages:1410
Registered:July 2006 Location: People riding polar bears...
This being a pretty big change to how the game can be played, I think it may be time to rework grenades altogether. A frag grenade shouldn't be able to bring a building down, right? An HE one would definitely do the trick.
Silent Storm handled this pretty well. Maybe 1.13 should too.
Range and damage versus collateral destruction.
How many non-crazy-powerful bullets does it take to bring down a wall tile anyway? Not possible?
Non-flat rooftops can also be destroyed. They are multi-tile entities, however. Due to their nature, they will be destroyed if their 'root'-tile is destroyed. There are sometimes other roof tiles beneath them. This will have a somewhat odd effect - the flat tiles will be destroyed, but the slanted tiles will remain. Engine limitation.
@smeag: Well, with Fortifications revisited you can. However it seems the pathing on player-built roofs doesn't work correctly, but this is outside the scope of this feature.
@Ocular: Oddly enough, this effect only appears on some roofs, and then only on certain tiles. It also seems that saving and reloading removes this glitch. It seems to me some internal pathing structure isn't correctly updated upon destruction, but I could not find it yet.
@Sevenfm: hmm. the sounds are good, but don't seem that much better to me.
As the same roof type is used for different houses, we can't rely upon it's material. We could use the type of the walls though, as I do for armour, but that's a detail I currently don't have time for. But you know how to code, so feel free to add this
@Slax: Frags are bullets. Bullets don't destroy structures unless you use anti-materiel ammo.
yarco
And what about anti material rifles? can we shoot through the roofs?
Hitting a roof itself is ugly to code due to the engine. But as anti-materiel rifles can destroy walls, this can also damage roofs along the way (since r7618 that is )
I added two things in r7618:
Fixed the issue smeagol reported - at the source of the explosions the roof was always destroyed. The situation in the video from above is still the same, there is however the chance that a mortar shell doesn't do enough damage and does not destroy the roof.
Anti-material rifles damage walls. If a wall gets destroyed, the roof on top of it can also be destroyed. However, note that the damage done by these rifles to structures is relatively small (compared to, say, C1 or a LAW). It is currently unlikely you will destroy a lot of roof tiles with these rifles alone.
A problem of roofs is that their structures have no hitpoints. That is, there are two variables for that, but one is overwritten by another required variable, and the other one is always 0. Roofs were simply not meant by Sirtech to be destroyed. For this reason, I can currently only destroy a roof or not.
I could try to alter that by filling the second variable with data, but knowing the game, this will likely screw up something somewhere. I want to research that first . I already coded this, it jsut has to be commented in
A code limitation that has annoyed players since 1.00 is that roofs cannot be destroyed. This is especially jarring when the rest of the building has already been destroyed, leaving a floating platform that defies gravity and common sense.
I've corrected that. Explosions near walls, or on the roof itself, can collapse portions of it.
A soldier on a collapsing roof tile will fall down and take damage.
A soldier below a collapsing roof tile will take damage from the debris.
How many roof tiles collapse depends on the strength and distance to supporting walls.
If no supporting wall is found, the entire ceiling comes down.
Some heavily armoured roofs (in, say, a secret research facility) cannot be collapsed.
For demonstration reasons, Red wounds Buns with maximum collateral damage, and Bob makes a few holes into a factory full of childrenBeta Testers:
One new item was added for this, item #1727 (Roof Collapse) with the tag 268435456. This is required for internal reasons. Any mod wishing to have this feature requires this item and the connected entries in Explosives.xml and ExplosivesData.xml.
A new sound and a new animation are also needed.
It is easily possible to add better animations, or even animations to collapse multiple tiles at once. Knowing the community however, nobody will ever do this.
No, this will not go into any 2014 stable release patches.
If we now teach the AI to use explosives differently, we might have a good counter to the cheap tactic of camping on rooftops :crossbones:
This has been added to the trunk in r7614 and is fully savegame compatible. GameDir >= r2174 is required, as new animations and sounds were added. Using a lower GameDir will cause penguins to apply to the police academy.
===
but what will be if on the roof is Sandbags as in NO mod ?
what about destruction of objects on the roof ?
still impossible ?
light on roof ... still not work as on ground ?
====
*what will happen if one person falls to another, on head ?
If I remember correctly, NO is not based on the 1.13 trunk and is based on separate code (I might be mistaken here). So it wouldn't be compatible to a current SCI exe anyway.
I assume, however, that the NO sandbags on the roof are either an extension of the ground floor walls, in which they will blow up normally like other walls, or are indeed part of the roof. In this case they will collapse just like other roof tiles. Should the sandbags, however, be indeed separate structures on the roof itself, then that would be somewhat remarkable and a desirable code extension (I am not, however, going to look for that. I have no intention of digging in ancient code, incompatible to current code, with cyrillic comments I do not understand ).
Items on roofs get damaged by explosions just like they do on ground floor. If the roof under them collapses, they fall to the floor beneath them. If that would render them inaccessible, they fall to a nearby tile.
Same for persons. If a roof collapses and a person falls to the ground, but the space is already occupied, they fall to a nearby tile. Up to a distance limit, however. If a player decides to fill an entire building with people and drop down people into it, at some point they will occupy the same tile, because screw you people Leaving the tile solves the issue anyway.
Light on roofs has nothing to do with this feature.