OpenXcom Forum
Modding => OpenXcom Extended => OXCE Suggestions DONE => Topic started by: Finnik on March 21, 2023, 01:04:59 pm
-
[Suggestion] Gravlift not only for floor tiles
----------------
While creating a level design for my craft, I faced with a code vs. design problem - I wanted to make a side ladder to deploy troops from the hatch of the craft, but in order to make a ladder I actually must define it not in object (ladder), but only for the floor tile type.
I know, currently modders live with that, but I don't think it is very good:
1) If the ladder tile was destroyed, but floor tile is ok - gravlift will still "magically" (for the player) works.
2) As a modder, I need to define floor image, as craft map will replace floor tile of the landing zone's floor tile, which is not very good - I want my craft ladder even don't touch the ground with keeping original landing zone tile as is.
I looked at the code, but was a bit confused - it looks like a simple check in gravlift code for working only with floors. I altered it, but it turns to be not working. Also, this tile engine part is still very scare to me to touch, and I have no idea why this restriction was originally placed.
You might want this change in OXCE, as such gravlift ladders appear in different mods, but if you don't - an advise for implementation of such a feature would be also super appreciated.
-
Ah, ladders. A constant pain in the ass, as you need to make a special ground tile just for them (and often another, invisible one for a mid-point), wasting precious tile space.
I wholeheartedly support the idea of enabling the lift functionality on objects.
-
This could need more work to do, as currently GravLift is interacting with two floors, one beneath you and another on top of you.
I do not remember exactly this part of code but it could need more spacial cases to work correctly.
-
Ah, ladders. A constant pain in the ass, as you need to make a special ground tile just for them (and often another, invisible one for a mid-point), wasting precious tile space.
I wholeheartedly support the idea of enabling the lift functionality on objects.
Biggest question is: should engine allow you standing on top of ladder? :>
This mean:
S
L
L
L
where `L` is ladder and `S` is soldier
I consider if ladder should be on level where you want climb too. If someone would shoot part next to you, you will fall one level down.
Simply standing on top of ladder (that is on lower level) will look bit bizarre.
[ps]
I think this could be more a "Climbing wall" than "Gravity Lift", that you could move sideway if two are in row.
[ps2]
Even more fun if we combine it with custom move costs, like you can climb some walls but you need special gear to do it.
-
Biggest question is: should engine allow you standing on top of ladder? :>
I don't think it's really necessary. Like you said, it would look weird.
I generally make ladders in one of 2 ways - see the attachment for the relevant one (the other one being just a floor tile with a hole).
I think this could be more a "Climbing wall" than "Gravity Lift", that you could move sideway if two are in row.
[ps2]
Even more fun if we combine it with custom move costs, like you can climb some walls but you need special gear to do it.
These are good points too. :)
-
Ok, I will make ladder like on your screenshot "canonical" version.
I first try finish refactor of vapor and I could check to see if would be easy to implement some thing like this.
-
First hack to make it work. It need lot more work to finish all details but basic logic is available.
WIP branch: https://github.com/Yankes/OpenXcom/tree/stash/climb
-
Incredible. I'm drooling with anticipation. :)
-
Thank you! Looking forward to seeing it in a release version!
-
Also some new attributes for changing tile move cost per armor have been added in OXCE v7.9:
armors:
- type: STR_POWER_SUIT_UC
moveCost:
baseClimbPercent: [100, 100]
climbUpPercent: [100, 50]
climbDownPercent: [100, 50]
See also this post for the full list: https://openxcom.org/forum/index.php/topic,11239.0.html
-
So..
If I add those attributes to the stats of an alien armor, say the Chryssalid armor, the alien will be able to climb walls?
-
No, those attributes are already present on all armors, they are the default values.
To climb walls, you need to mark tile parts as such (with grav lift flag I believe)... more info @Solarius and @Yankes... I didn't pay too much attention.
-
Sorry, I haven't played with armours. All I've implemented is climbable walls (well, actually ladders).
Attached a screenshot showing an example with all relevant values circled.
-
So..
If I add those attributes to the stats of an alien armor, say the Chryssalid armor, the alien will be able to climb walls?
Video show was more a hack where I put flag `GravLift` on every tile to test this logic.
In theory we could add option for climbing any wall but this require refractor as it now would conflict with other move options.
Currently you can disable armor that will not climb on any ladder, or when setting `TU_Slide` or `TU_Walk` to 255 you can disable
climb for all armors that have specific move type.
-
First hack to make it work. It need lot more work to finish all details but basic logic is available.
WIP branch: https://github.com/Yankes/OpenXcom/tree/stash/climb
wow. can not wait. keep up the good work guys.
-
Is already implemented and used in XFiles