• We are currently performing site maintenance, parts of civfanatics are currently offline, but will come back online in the coming days. For more updates please see here.

Dungeon Adventure MOD MOD

Will you use Afterworld mechanisms how much? The ranged attack would be ideal for archery, and as melee combat counts also as one swing only it would be perfect for a roguelike, so you can run away if you are fast enough.
 
Will you use Afterworld mechanisms how much? The ranged attack would be ideal for archery, and as melee combat counts also as one swing only it would be perfect for a roguelike, so you can run away if you are fast enough.

I've already reused the Afterworld doors.

I'd like to use the ranged combat eventually, but I do not think it will be in the first version. I have alot of xml and python to untangle before I can implement it. I am also trying to figure out targeted spells -- didn't FfH2 used to have these?

Anyway - I agree that ranged combat would be great for the Thiefy types, but it need to wait.
 
For tonight, I sunk my teeth into the civics. Wow, are these things linked into everything, or what? I finally implemented my first two new civic categories: Ethic and Moral:

civicsmt9.jpg


They don't do anything yet, but will eventually allow/restrict units and other choices, much like regular civics do. The time I was going to spend fleshing these out was instead spent chasing down and eliminating XML references to the civics I replaced!

I will also replace the civic button art -- at least some of them. I am not fond of the all black "never" tech placeholder for my "neutral" civic.

Anyway, I plan to add a civic called "Goal" which gives choices like "Wealth," "Power," and "Knowledge." This civic will affect how the player is awarded victory points, if I can figure out how to implement it. For example, a player who chooses "Wealth" would earn more points for amassing lots of gold (Khazad, anyone?), while a "Power" player would get extra points for eliminating enemy units. Or something like that.

I am looking for other ideas for civic classes and how different civic choices under that class would affect gameplay. So if you have any ideas, please trot them out!
 
I think that Water could work decently well for Neutral, or you could snag a Taoism icon from Vanilla.

You could have Weapon Proficiency be one civic, which affects your Melee types, Spell Spheres as another to affect your Arcane, and Personal Inclination as a third to affect your Thief types. Basically they would allow you to have a "Sub-class" emphasis (so Assassin, Thief or Ranger type of Thieves, Healer, Summoner or Spellslinger for Mage, and 2 hander, 1 hander or ranged for the Melee). Something along those lines.

Could also go with an "Attention" category, so state what you are "keeping an eye out" for. So if you are Attentive to Danger, you get better bonuses against monsters, if you are attentive to Secrets you can more easily find hidden caches of goods...
 
Good ideas xienwolf, like usual
 
Took a break from button pics and civics to add a new piece of equipment: The boarding hook. (actually a scaled down version of the elven halberd made by White Rabbit -- thanks Rabbit!)

The boarding hook gives the holding unit the "boarding" promotion, allowing it to attack and capture naval units. In a dungeon, this may come in handy for crossing subterranean lakes. You never know!
 
It's really awesome =).
I began to dream about "additional maps" in the laaate main FFH where your units will spawn (like on "local" map) and make wondrous deeds due to some event (i.e. dungeon event where your hero spawns is a random-generated maze =)).
 
Arggghh!

I am issuing a call for help to the FfH2 team or anyone else with coding experience.

I am trying to create a "trap" unit for placement in the dungeons. I think that this idea really needs to implemented as a unit, and not a feature or improvement, because it need to be totally hidden from the player. Features and improvements show a tell tale in the interface even if you try to blank out all the information.

All right -- so I'm trying to make these traps hidden or invisible, and to explode with fire or other damage if a player moves onto the tile containing the unit.

First I thought, "I'll just make a hidden pyre zombie that can't move. That should work, right?" Well.... no.

If the unit is marked as invisible or hidden, the player's unit will not interact with it when it moves onto the same tile. The unit works just fine if it is visible, but then the player gets the red combat odds circle etc. etc. This defeats the purpose of having a hidden hazard.

I want these things to be discoverable by Thief types using an ability that will behave like the Revelation spell. If the Thief finds the trap, it becomes visible and can be more easily avoided. Or maybe even removed.

I have tried flipping various tags on the unit_info entry, but have not gotten the result I want.

I even played around with giving the trap unit a special spell that it would cast if an enemy unit was in "zero" range. It didn't work. Just to check, I gave the trap the divine and fire3 promotions to see if it would flame strike a player's units that were within range. It would not use this ability. Stupid trap!

Grrr.

Any suggestions on how to make this unit work as intended? (It's supposed to be a trap, right? You don't see it, you step on it, and something bad happens. That's the goal, anyway.)
 
Invisible unit with a Direct Damage spell that only works against units in the tile and costs the life of the caster was my idea, but then I read that you tried it... did you increase the AI weight function of the spell dramatically?

Why have it completely hidden? You can go with the "Mimic" idea and have it appear to be something else, but in truth be the trap (then you can use the Goody Hut mechanism to force them to automatically trigger it when they walk onto the tile. Not sure how to have a thief detect that though, unless you could give him a range 2 spell which will change them into a readily identifiable trap improvement instead (which can then be moved onto and pillaged)
 
The mimic unit is my backup plan. I already have treasure chests using the goody hut mechanism, and some of the options give damage and a "you sprung a trap" message. This would be doable, but not as desireable. It kind of limits placement of the traps to places where the other features would plausably be. Treasure chests in the middle of a corridor look fishy!

Ideally, I want the player to have no indication that anything is amiss. Thus the desire for a hidden unit.

I will retry the spell idea, setting the weight up high. What is the upper limit on weight? I'd like the trap to trigger almost always.
 
I *think* you could use an event, didn't sometime ago Kael say that events could trigger inside a turn? Anyway, have the event trigger when a unit is on a tile with this invisible trap unit, with a -1 weighting to the event so it would always happen when it was possible. Then just have the effect be "<unit> has set off a trap!" and give it however much damage. Awesome Job with your mod by the way, looking forward to playing it.
 
You may need to use python, or hardcode something into the SDK if you want it to be faster.


The most direct way would be to trigger the damage/spell/whatever, when a unit moves into the tile with the trap unit present. That would be in def onUnitMove(self, argsList). Every time any unit moves you would have to cycle through every unit on the tile it is entering (well, you can stop once you find the trap, using "break"), cycle through all the units on a tile, and then trigger the effect if the unit is a trap. Of course, this could probably slow the game down considerably, at least if there are a lot of large stacks.



You could also give the traps a promotion that has a pyPerTurn effect. You could basically copy the Crown of Brilliance promotion/effect/spell for this. I'm not quite sure when in the turn this would trigger though, so it might, for instance, only trigger if the victim is on the same tile as (or close enough to) the trap at the start of stop of the turn, and have no effect if it passes through the trap without stopping there. So as to not give away the traps, you might need to check to make sure there is a valid target before the effect triggers the spell.

The effect could easily be caused by the same promotion that makes the unit invisible, thus one revelation-based spell to easily make traps visible and disable them at the same time by removing said promotion.
 
Good ideas you guys! That's one of the things I love about the Civ4 community!

xienwolf, I think you nailed it with the spell weight suggestion. I gave my trap unit the divine and fire3 promotions, and temporarily set the aI weight on the flamestrike spell to 1000. Sure enough, when my player unit got in range, after one skipped turn, the trap zapped me!

From here it should be easy to make a new spell that operates within range zero (same tile), or even a further range. I'll probably make the trap self destruct after casting the spell, but perhaps some more robust traps will stick around.

Wow, this is cool. Opens up a whole new range of possibilities!

Thanks everyone!

UPDATED:

The traps are working now -- they trigger when an enemy (player) unit moves within one tile, but will not trigger if the enemy is right on top of the trap. This is a wrinkle of the flamestrike code, which prevents a unit from flamestriking friendly units. The trap sees itself as a friendly unit, and so will not strike its own tile. Fair enough. This def req is needed to keep traps from springing on other barb units, so I guess I can live with it. We want to save the traps for the players!

It would be nice if I could figure out a way to get the spell to trigger if an enemy is in range, EVEN IF a friendly is there, too. Then the spell could be perfected.
 
Actually I hadn't gone into detail on my Mimic idea because I had posted before I got the idea and didn't know if you had already read it by the time I first edited in the Mimic (I hate that there is no notification of edited posts...), and I didn't want 2 posts in a row just to elaborate on it :)


What you would do for the Mimic idea is create an improvement which is just a torchstand, or a decorative table, or a rug... Then you use the same graphics for your Mimic as well. For the non-trap ones it will just be decoration (Mouseover shows the name "Just an ordinary rug..." or something), and moving onto them doesn't do anything. For fun you could make them flammable so that when your mage is tossing fireballs all over the place you might set the hallway on fire! That'd actually be cool...

Anyway, for the actual traps, they look the same, have the same mouseovers, but have a Goody List which they will automatically trigger when you step onto the tile with them that gives you the results of your trap (some REALLY bad that are flagged as <bBad> and some not completely horrible, but still bad, that are not. That way a Thief who fails to search for them still gets off a bit easier than the others. Or of course you could grant the Mages the NoBadGoodies flag instead to show that they have defensive spells to ward themselves against trap damage). But also make it so that the Thief's "Detect Traps" spell will convert any trap within 2 tiles to a new improvement which can then be interacted with differently (probably with a function similar to the Rob Grave, just renamed to Disarm Trap, and on a new goody table to indicate chances of success).



But yeah, all the other ideas here should work quite well. The event idea from Tyrs could possibly be done with nothing but XML in fact. Reasonably certain I recall seeing triggers in there for specific units on a tile with each other.
 
i was really curious with how you would get traps to work, great job :)

i think it would be good if some traps didn't die after they are used, so if you get through once safely without disarming it, you would still have to get back out...
 
Hyborem's Whisper acts be having the spell call a python function that forces the event to occur. I'm not sure you can have the events happen in the middle of a turn without forcing somehow, probably requiring python. Of course, I'm no expert on events by any means.
 
Lutefisk, why don't you start setting up some python onUnitMove functions? Since I think in the future you are going to want several abilities based on character movements wouldn't it be more efficient to start a custom def that will work when a players units move? Since we are talking about a single player scenario the first if statement would include:

if pUnit.getOwner() == 0:

Then run a whole series of checks. Due to the scale of the game the CPU time would not be noticible (since the CPU runs faster than a human can think).

This would have the advantage of not relying on a different unit and tricking it every time you want it to do something. Instead you can have a trap unit and use a different set of promotions depending on what type of trap you want (poison gas promotion, spike trap promotion, false pit promotion) that is looked at in the python.

If you want I can try to whip something up, just let me know the details of what effect you want.
 
@mtagge: You are hired!

The work around I have now is a unique unit called a "trap," that has the hidden promotion (so it is disciverable by Thief types). I also gave it a special promotion called "trap." The trap promotion lets a unit cast a spell similar to flame strike, but with a 1000 AI weight.

So, it sort of works, but I like your idea better. Either that or an event script that always triggers when a trap unit and a player unit are on the same tile.

I like the idea of different promotions for different traps -- lots easier than a different unit for each trap type. You could also make the trap immune to its own type of damage, for example a fire trap is immune to fire, so it can be a persistent trap.

I noticed that Afterworld seems to use an "OnUnitMove" function for landmines, but I couldn't make sense out of it.

mtagge, if you can provide a sample of what this OnUnitMove python would look like, I'd be thankful!

Essentially, the script should look to see if a unit not belonging to the trap owner has moved onto the trap. Then the script should find the promotions of the trap (like PROMOTION_FIRE_TRAP or PROMOTION_POISON_TRAP) and deal out damage accordingly to ALL units in the stack. All of this would take place on the xy plot of the trap itself.

If someone else want to fiddle with an event script idea that would be appreciated, too. I think many people in the mod community would be interested in getting this concept to work.
 
In the meantime, I will flesh out traps to work with my current mechanism. Right now, there is a single "trap" unit that starts with hidden and trap promotions. The trap promotion allows it to cast the "activate trap" spell if the player gets too close. This works well, so far. In playtesting I saw a trap nail an AI Belseraph Scout, so it will attack other non-human players, too. (but not the barbs ;))

The spell python code does the real heavy lifting. It is essentially a heavily modded version of the flamestrike spell.

It sets default parameters for the trap and then looks for other promotions on the trap unit. So -- it assumes the trap is a mechanical trap, unless it finds promotions that change the trap type. Right now, I just have it look for FIRE1 for a fire trap, DEATH1 for an unholy trap, etc.

The python then adjusts the damage type, visual effect and sound effect accordingly.

Viola! Lots of different traps!

A picture of a revealed trap is below:

trapgg5.jpg
 
Could you not just make it cast pillar of flame instead of ring of flames to get it to strike its own tile? Then it should work.
 
Back
Top Bottom