View Full Version : Dungeon Adventure MOD MOD


Pages : [1] 2 3

Lutefisk Mafia
Mar 18, 2008, 02:51 PM
I am posting this to share some progress I've made with a FfH2 MOD MOD I've been working on.

Basically, I am trying to convert the game to make it more of a dungeon adventure. As I get into this more, I realize what an insane amount of work it is and just how finicky the Civ4 engine can be (often spits out new NIFs).

Pre-Alpha release here: http://forums.civfanatics.com/showpost.php?p=6820283&postcount=400
patch "a" (unzip into "Adventure" subfolder of Mods directory) = http://www.atomicgamer.com/file.php?id=69364

A replacement shortcut is posted below. It may resolve some Vista issues. On the other hand, it may not. Vista is like that.
http://www.atomicgamer.com/file.php?id=69467

Here is a link to the Intro Movie, posted on YouTube:

http://www.youtube.com/watch?v=VhFzrzvS5nk

Here are some in-game videos that show certain features:

Claim function = http://www.youtube.com/watch?v=0OI1BAPtwDA
Snack Rats and Weirdeer = http://www.youtube.com/watch?v=DJK5T6Z8ETw
The Green Death = http://www.youtube.com/watch?v=R42BAWVEHZY
Bats = http://www.youtube.com/watch?v=Nmx_ygFFpl4
Altars = http://www.youtube.com/watch?v=dsWZ5WWco6Q
Glyph and Trap = http://www.youtube.com/watch?v=uMYvv7yN0M4
Lantern and Unknown Potion = http://www.youtube.com/watch?v=Cv5mdl04dkc

Here are some screenies:

Starting Malakim Base Camp in Dungeon
http://img515.imageshack.us/img515/8051/adventure10000tk8.jpg

WorldBuilder look at larger area
http://img177.imageshack.us/img177/6702/adventure20000zd1.jpg

OooH! A Dragon's Lair!
http://img177.imageshack.us/img177/2513/adventure30000cp8.jpg

Across the lava, kill the Azer, and get the Hammer. But how?
http://img357.imageshack.us/img357/4572/adventure40000ld9.jpg

Explorer comes to a door
http://img357.imageshack.us/img357/2306/adventure50000gt0.jpg

And, yes, these doors open!
http://img357.imageshack.us/img357/4923/adventure60000yr9.jpg

Hmmn. A void in the central area, but no door?
http://img357.imageshack.us/img357/4236/adventure70000we4.jpg

Let's go up here and use the Thief's "Search" ability (one of the potion icons)
http://img515.imageshack.us/img515/3960/adventure80000fm4.jpg

Hey! I found a secret door!
http://img177.imageshack.us/img177/2537/adventure90000wg0.jpg

Anyway, I've added some neat things -- new textures and features, secret doors, regular doors, a few new potions and equipment, monster spawning sites.

I even figured out a way to make certain resources (like horses) moveable. The idea is that you can find horses in the dungeon and "pick them up." Either use them as a "mounted promotion" or drop them near your camp site to be used by your henchmen who hang out there. Leaving horses at the campsite can make it possible to upgrade along certain paths later in the game.

I envision a classic dungeon crawl along the lines of a very simplified D&D adventure. This mod would be more like a version of Rogue actually. (Bonus points if you are old enough to even know what Rogue is!)

Anyhow, I think I have a good start, but could use help and suggestions. I would be thrilled to collaborate with Kael and the FfH2 team, but don't know if they would be interested in working on yet another project.

But I'm happy to share my work, and would really appreciate any feedback. (Disclaimer: This is the first time I've done any work in XML or Python, so my approach to programming is: Bang on it until it works. The results are functional, but by no means elegant!)

Thanks!

woodelf
Mar 18, 2008, 02:59 PM
I think this looks super. :thumbsup: And I do remember playing Rogue and Dungeon Hack and Nethack. :)

I don't have much to add right now, but if you need anything graphically let me know and I'll try to help you out.

xienwolf
Mar 18, 2008, 03:05 PM
Wow... kinda harsh you did all this work and .31 has a feature built into it to incorporate many things which you did, but it looks awesome, and I am sure that you can mix what you did with the new stuff to get some incredible results.

kenken244
Mar 18, 2008, 03:08 PM
The Dragon horde screenshot makes me wonder if you could steal his horde since he is not on it. You could stack them and give the horde the always visible tag so it will still appear even when arceron is stacked with it.

Vehem
Mar 18, 2008, 03:08 PM
This really does look excellent - nice work :goodjob:

Lutefisk Mafia
Mar 18, 2008, 03:32 PM
The Dragon horde screenshot makes me wonder if you could steal his horde since he is not on it. You could stack them and give the horde the always visible tag so it will still appear even when arceron is stacked with it.

This Archeron can move and chase people. The mod right now is coded so that only the human player can open doors. So Archeron has free run of only his room.... until you open the door that is.

It is possible for a fast character or a Thief (sneaking) to get the gold before Archeron can react. Adds to gameplay!

Lutefisk Mafia
Mar 18, 2008, 03:34 PM
Wow... kinda harsh you did all this work and .31 has a feature built into it to incorporate many things which you did, but it looks awesome, and I am sure that you can mix what you did with the new stuff to get some incredible results.

Oh. Well, crap.

I guess I will look forward to .31 then. Still, I might be able to salvage something worthwhile.

woodelf
Mar 18, 2008, 03:49 PM
Definitely don't despair! This is a great concept.

thomas.berubeg
Mar 18, 2008, 03:51 PM
Amazing Work!

xienwolf
Mar 18, 2008, 03:57 PM
Aye, it is great work. The walls, doors, abilities and all of that is still quite useful. I guess you had missed the post about "Adventure Mode" so here is a link to it (http://forums.civfanatics.com/showpost.php?p=6609069&postcount=374).

Kael
Mar 18, 2008, 04:08 PM
This is amazing work and it doesn't conflict at all with what we are doing. "Adventure Mode" is a game option that makes things like this easier. It drops all units to single unit meshes (so there is never more than 1 unit in a group) and it doubles the scale of all objects.

The real work that you are doing around design of objects, unit abilities, etc is the real work and isnt done at all in the main mod. So Im hoping we will just make your job easier.

Lutefisk Mafia
Mar 18, 2008, 04:25 PM
This is amazing work and it doesn't conflict at all with what we are doing. "Adventure Mode" is a game option that makes things like this easier. It drops all units to single unit meshes (so there is never more than 1 unit in a group) and it doubles the scale of all objects.

The real work that you are doing around design of objects, unit abilities, etc is the real work and isnt done at all in the main mod. So Im hoping we will just make your job easier.

Thank you, Kael! That definitely cheers me up. And it seems like there is sufficient interest in something like this to justify further work on it. So, I'll keep plugging away at it and try to post updates on my progress in this thread from time to time.

BTW, to all of you folk on the FfH2 development team: What is it about adding new NIFs that the Civ4 engine hates so much? I swear, adding those doors was a royal pain. Is there a methodical way to do this that avoids conflicts? Quite frequently when I add new NIFs, the mod won't even load.

Anyway, thanks for the input so far and keep it coming. The more ideas and feedback the better!

Lutefisk Mafia
Mar 18, 2008, 04:36 PM
I think this looks super. :thumbsup: And I do remember playing Rogue and Dungeon Hack and Nethack. :)

I don't have much to add right now, but if you need anything graphically let me know and I'll try to help you out.

Thank you kindly, woodelf! I count myself as one of the many who have much respect for your virtual paint-slinging skills.

And it is nice to know that I'm not the only one who wasted countless hours playing an ASCII dungeon game. Heh, good times.

kenken244
Mar 18, 2008, 04:38 PM
It might be cool to merge this with some things in afterworld.

JDexter
Mar 18, 2008, 06:15 PM
VERY nice concept! I'd definitely love it and I hope you manage to release a playable version at some point (no stress, but don't loose motivation :D ).

thomas.berubeg
Mar 18, 2008, 07:15 PM
Lutefisk mafia.

You might not be at that point yet, but an interesting idea for one of your scenarios could be the bannor journey through hell...

Lutefisk Mafia
Mar 18, 2008, 09:08 PM
It might be cool to merge this with some things in afterworld.

Heh. Already done to a certain point. If you take a very close look at the doors, you will see that they are a NIF stretched, partly re-skinned version of the "simple door" feature asset from Afterworld. You can still see the stringy things on top that are supposed to bit of rebar -- I colored them to look like stone so that they blend in better.

But aside from that, the intent is to give it more of an RPG feel than 4X, so definitely more like Afterworld.

Kael
Mar 18, 2008, 10:08 PM
Here is a treasure chest for you. Have fun!

Lutefisk Mafia
Mar 18, 2008, 10:58 PM
Here is a treasure chest for you. Have fun!

Ooh, I love it. Absolutely love it!

Thank you!

I can use this as a theme-matching "goody hut," which is awesome. You just saved me a massive amount of time, because I was trying to figure out how to coax a good container out of my only NIF program, SceneViewer. (Easier said than done.)

Mod Pimp and mind reader!

Lutefisk Mafia
Mar 18, 2008, 11:27 PM
Okay. So I have Kael's lovely Treasure Chest, which I have looked at and admired in SceneViewer, but I cant seem to introduce it into my mod correctly.

The approach I took was to first unzip the files, which produced the "treasure chest" folder with the chest NIF and DDS file, plus the boundshape.nif.

I copied the whole folder into the asets/art/structures/improvements folder. Having made only that change, I tried to load the mod. No go. It looks like it starts to access XML, but crashed to the Vista "this program has stopped working" pop-up.

I tried removing the boundshapes.nif and tried to restart. No luck.

I then changed the XML code in the Civ4artdefines_improvement.xml file under the "goody hut" entry to change the path of the nif file to the one in my new "treasure chest" folder. The kfm line was changed to a blank entry. Still no load.

Why will the program crash if you simply add a folder and a few files into a sub-folder of "assets," even if nothing in the XML is trying to access that file yet?

This is the issue that I have been running into again and again. I sometimes eventually get my stuff to work, but honestly have not been able to figure out exactly what I did that actually fixed it.

Any suggestions?

xienwolf
Mar 18, 2008, 11:48 PM
Well, I just popped those 3 files into a folder called Chest and loaded it into my Assets/Art folder, worked fine.

I am guessing you already have some items added to your Art folder, as I do not have any Structures folder in there, let alone another inside of that. So at least that eliminates some possibilities.

My best guess: There is a limit to how deeply you can Nest a folder. Thus if you moved it back 1 or 2 folders total you should possibly be fine.

Best workaround I can think of: Quit putting things where the computer has any possible pre-conceptions ;) If you toss things into Assets/Modules then there is guaranteed no limit to your nesting allowance, and the computer doesn't expect any specific structure. Once you have it working, then you can shuffle it into a more "normal" location and at least know that it isn't the files themselves which are the problem, but something in the core program and structure.

EDIT: Just tried it with the exact file structure which you defined yourself as using, and it worked fine. So I got no clue.

mtagge
Mar 19, 2008, 03:40 AM
Anyhow, I think I have a good start, but could use help and suggestions. I would be thrilled to collaborate with Kael and the FfH2 team, but don't know if they would be interested in working on yet another project.

But I'm happy to share my work, and would really appreciate any feedback. (Disclaimer: This is the first time I've done any work in XML or Python, so my approach to programming is: Bang on it until it works. The results are functional, but by no means elegant!)

Thanks!
That sounds a bit much like my style of programming. :lol: I am starting to feel comfortable around python and wouldn't mind pitching in with trying to get some functions up and running. I won't be able to download anything from the Internet until I change duty stations to Germany this summer, but I don't mind passing around code, reviewing your work, or helping codesmith a little. Feel free to include the mod comp I am working on now http://forums.civfanatics.com/showthread.php?p=6613194 as in your mod I don't think the added CPU time will be a factor with an adventure style of play. And if you want me to modify it in any way, just let me know. It is always easier to modify your own code then someone elses.

Cheers

woodelf
Mar 19, 2008, 05:10 AM
I blame Vista. Sometimes I can mod in it and other times it simply won't let me mod my own computer/files. :hmm:

Marksman77
Mar 19, 2008, 05:14 AM
Kinda funny that the sophisticated CivIV engine is plugged to recreate the old ASCII game :)
Keep the good job, I can't wait for the result :goodjob: I loved rogue, dungeon crawl etc.!

Psychic_Llamas
Mar 19, 2008, 07:01 AM
great work here! i was wondering how long it would take before somone decided to do this :p. just a couple of question: how do cities work? do you build buildings and stuff as usual or do they act differently? can you get lots of adventurers or only a limited number? can you build other units? are there different kinds of adventurere (ie sorcerer, wizard, rogue, paladin etc) or must you upgrade them to FfH flavoured units like normal grigory adventurers?

again, great job with this, i will definately be keeping an eye on it :p

Kael
Mar 19, 2008, 07:53 AM
Okay. So I have Kael's lovely Treasure Chest, which I have looked at and admired in SceneViewer, but I cant seem to introduce it into my mod correctly.

The approach I took was to first unzip the files, which produced the "treasure chest" folder with the chest NIF and DDS file, plus the boundshape.nif.

I copied the whole folder into the asets/art/structures/improvements folder. Having made only that change, I tried to load the mod. No go. It looks like it starts to access XML, but crashed to the Vista "this program has stopped working" pop-up.

I tried removing the boundshapes.nif and tried to restart. No luck.

I then changed the XML code in the Civ4artdefines_improvement.xml file under the "goody hut" entry to change the path of the nif file to the one in my new "treasure chest" folder. The kfm line was changed to a blank entry. Still no load.

Why will the program crash if you simply add a folder and a few files into a sub-folder of "assets," even if nothing in the XML is trying to access that file yet?

This is the issue that I have been running into again and again. I sometimes eventually get my stuff to work, but honestly have not been able to figure out exactly what I did that actually fixed it.

Any suggestions?

Very odd. You should be able to put anything in that directory without an issue if it isnt referenced. All that Civ4 does is copy it into cache when it loads. If it is crashing during load I would have to guess one of the following:

1. The crash isnt related to the addition of the chest graphics. Removing them will still get the crash.

or

2. Your hard drive is dangerously low on space. When it goes to cache all the art files it is running out of room and crashing Civ4.

or

3. You don't have the vista permissions you require to make these changes. I noticed this on Woodelfs computer where I wasnt able to modify some files even though he seemed to be an admin on the machine. You'd have to talk to someone with more vista expereince to figure it out.

Lutefisk Mafia
Mar 19, 2008, 10:32 AM
After playing around with different things, I have isolated the problem.

It's Vista.

Gee, what a surprise.

To make a long story short, after struggling with this freakishly uncooperative OS, I finally solved the problem by by disabling UAC. Now I have no issues whatsoever when I add new folders and files. :)

Thanks for the suggestions, everyone, I should be able to pick up the pace now that I don't have to continually fight with an OS that behaves like a petulant 3-year-old.

I'm also going to look in the general mods forum and post a thread about this issue (if there isn't one already). I can't be the only one who faced this frustration.

woodelf
Mar 19, 2008, 10:34 AM
Congrats. Care to PM me and tell me what you mean by disabling the UAC? I'd love to as well.

Lutefisk Mafia
Mar 19, 2008, 10:48 AM
great work here! i was wondering how long it would take before somone decided to do this :p. just a couple of question: how do cities work? do you build buildings and stuff as usual or do they act differently? can you get lots of adventurers or only a limited number? can you build other units? are there different kinds of adventurere (ie sorcerer, wizard, rogue, paladin etc) or must you upgrade them to FfH flavoured units like normal grigory adventurers?

again, great job with this, i will definately be keeping an eye on it :p

The concepts are still fluid, but here are some of my current guiding ideas:

You start with a party of three Adventurers. The Adventurers can upgrade along a warrior, thief, or spell user path. Depending on your Civics, specialized options are available at hogher levels. For example, you can eventually upgrade a fighter type to a Paladin, but must have the civics "Lawful" and "Good" enabled. So at present, it is more like the Grigori Adventurer upgrades. But you can choose to have a party of all magic users, or one of each type, or whatever mix you choose.

I'm thinking that the civics will be alignment choices(Lawful-Neutral-Chaotic and Good-Neutral-Evil), quest focus (Wealth-Knowledge-Power), and maybe a party specialty (Militarism-Intellectualism-Spiritualism). As noted, certain unit upgrades will be available to only certain civics.

You have only one "city," which is your campsite. This is a place to park stuff, and upgrade your units. The options build will be limited to "buildings that enable new upgrades and a very select few units. The "population" units will represent one henchman who hangs out at your camp. Depending on what goodies you find in the dungeon and drop within the fat cross of the camp, your henchmen can "work" these assets to increase money knowledge or production of the campsite. Increasing the food available at the campsite will allow a greater number of henchmen to inhabit the campsite.

You start with the three Adventurers. Depending on your campsite features, you will summon additional Adventurers to your campsite at a certain rate (these are your Great People). It may also be possible to occasionally attract a Learned Sage or other Great Person to your side.

Presently, and for the forseeable future, each adventure map would be a one-off scenario. These woul dbe super easy to make in WB, however, so I can envision people in the fan community making dungeons and swapping them around. It would be really neat if someone could code a good map generating script to provide random adventures, but that is probably a ways off.

Lutefisk Mafia
Mar 19, 2008, 10:53 AM
Congrats. Care to PM me and tell me what you mean by disabling the UAC? I'd love to as well.

I'll post it here so everyone can see, too.

Follow this link, which has easy to follow instructions:

http://blogs.msdn.com/tims/archive/2006/09/20/763275.aspx

Alternatively, just Google "disable UAC Vista" and you will find many other links with information on various ways to do this.

UAC is User Account Control, which is how Vista determines who is allowed to access or alter certain files. Thing is, though, unless you are logged in as an Admin, Vista assumes that you do not have common permissions to do stuff like this. It is sort of like forcing your self-contained PC to be treated like a large corporate network in which the default is that you can't mess around with files. Kinda dumb if you are the only person who uses your computer.

Let me know if this works for you, too.

Kael
Mar 19, 2008, 10:56 AM
I'll post it here so everyone can see, too.

Follow this link, which has easy to follow instructions:

http://blogs.msdn.com/tims/archive/2006/09/20/763275.aspx

Alternatively, just Google "disable UAC Vista" and you will find many other links with information on various ways to do this.

UAC is User Account Control, which is how Vista determines who is allowed to access or alter certain files. Thing is, though, unless you are logged in as an Admin, Vista assumes that you do not have common permissions to do stuff like this. It is sort of like forcing your self-contained PC to be treated like a large corporate network in which the default is that you can't mess around with files. Kinda dumb if you are the only person who uses your computer.

Let me know if this works for you, too.

Great find, Im gald you posted about it. I often get weird permission issues reported by Vista issues and I think this will help with a ton of them.

Vehem
Mar 19, 2008, 11:01 AM
UAC is User Account Control, which is how Vista determines who is allowed to access or alter certain files. Thing is, though, unless you are logged in as an Admin, Vista assumes that you do not have common permissions to do stuff like this. It is sort of like forcing your self-contained PC to be treated like a large corporate network in which the default is that you can't mess around with files. Kinda dumb if you are the only person who uses your computer.

Let me know if this works for you, too.

I'd love to show this to my flatmate - he's a Linux fan-boy and a big exponent of Account Control and permissions. We quite often debate whether or not they serve the user in any way on a single user system, but we've never quite managed to convince each other one way or the other.

The one thing we can agree on though is that Vista does it extremely badly and given that you've posted an option to disable it has made me dread the day I have to abandon XP a little less (mind you, I still estimate that to be several years away). Thanks.

woodelf
Mar 19, 2008, 11:19 AM
Thanks Lutefisk. Sorry for the hijacking. :)

Lutefisk Mafia
Mar 19, 2008, 01:14 PM
I'd love to show this to my flatmate - he's a Linux fan-boy and a big exponent of Account Control and permissions. We quite often debate whether or not they serve the user in any way on a single user system, but we've never quite managed to convince each other one way or the other.

Well, it is a good idea to get a warning if a program is trying to perform admin level functions that you may not have intended to be initiated. The way I look at it though, is that I have a single user PC. So if something is happening, it is because I started the program or it is an automated function of a program that I have vetted and installed myself.

I have good anti-virus, anti-spyware, and anti-rootkit programs installed. They take care of the nasties. I don't need UAC, and it just gets in the way of activities like modding.

@woodelf: No worries! The way I see it, this is definitely related to my mod, because I couldn't mod until it got fixed! Besides, if anyone hijacked the thread it was me! ;)

Kael
Mar 19, 2008, 01:18 PM
I'd love to show this to my flatmate - he's a Linux fan-boy and a big exponent of Account Control and permissions. We quite often debate whether or not they serve the user in any way on a single user system, but we've never quite managed to convince each other one way or the other.

Well, it is a good idea to get a warning if a program is trying to perform admin level functions that you may not have intended to be initiated. The way I look at it though, is that I have a single user PC. So if something is happening, it is because I started the program or it is an automated function of a program that I have vetted and installed myself.

I have good anti-virus, anti-spyware, and anti-rootkit programs installed. They take care of the nasties. I don't need UAC, and it just gets in the way of activities like modding.

@woodelf: No worries! The way I see it, this is definitely related to my mod, because I couldn't mod until it got fixed! Besides, if anyone hijacked the thread it was me! ;)

I agree. Id also recommend AppArmor for Linux which does exactly what you suggest, locking down the rights of applications to keep them under control, not the users. That way aplications can be set to only be able to write to specific directories, etc.

Lutefisk Mafia
Mar 19, 2008, 01:29 PM
And here it is. After fixing Vista, it took me all of 30 seconds to plop the files in a new directory, repath the artdefines file, set the scale -- and here we go:

http://img136.imageshack.us/img136/1569/treasure0000bv5.jpg

This is currently functioning as the default goody hut. Later, I will tweak the functions of the goody hut so that treasure chests yield a random amount of gold, equipment, or even a trap.

Thanks, everyone!

Rex rgis of Ter
Mar 19, 2008, 01:31 PM
:eek:It's amazing! I can't wait until it's released!

What are you planning on the Victory Conditions being? Great Job!

Broken Hawk
Mar 19, 2008, 01:52 PM
Wow! A new of achievement.

xienwolf
Mar 19, 2008, 01:58 PM
I've got to find some of the button files which I had downloaded and hook you up. But in case I forget to do so, check the Graphic Modpack area, I am reasonably certain most of them came through there. Tons of really nice, ready to use, buttons out there :)


For this mod-mod more than any other, changing how the Goody Huts work is vital, can't wait to see how you re-write it :)

zxcvbnm
Mar 19, 2008, 02:19 PM
I had some ideas about a mod much like this, I just don't remember where I put them...

Anyway, looks great and I really like Roguelikes.

woodelf
Mar 19, 2008, 02:30 PM
Keep the progress coming!

jimi12
Mar 19, 2008, 03:21 PM
this looks amazing! i cant wait to see how you develop this! great job

xienwolf
Mar 19, 2008, 03:49 PM
Ok, I finally found the link :) I was looking for the wrong keywords (as always), but here are White Rabbit's awesome Icons (http://forums.civfanatics.com/showthread.php?t=170785) (many used in FfH already). So now you can quit using the silly Healing potion for things like finding hidden passageways ;)

Also, Ploerpengel has some pretty nifty ones (http://forums.civfanatics.com/showthread.php?t=162814) which might be good for your adventurer classes and some other uses.

Lutefisk Mafia
Mar 19, 2008, 04:43 PM
For this mod-mod more than any other, changing how the Goody Huts work is vital, can't wait to see how you re-write it :)

Incidentally, I was trying to locate the Python section that does the random generation for popping goody huts. I know I've seen it, but can't find it again. Anyone remember in which file it is?

Thanks!

xienwolf
Mar 19, 2008, 04:52 PM
It's actually completely exposed to XML, just found it for someone in the main forums last night... I'll dredge it up real quick (FfH doesn't modify it so far, so you have to go all the way back to basic Civ IV files).

Ok, you want Civ 4\Assets\XML\GameInfo\CIV4GoodyInfo.xml. But if you already knew about that and REALLY wanted to poke around in the Python aspects of it I can give you that as well later. It's somewhat scattered about, and I doubt there is much you need it for, the XML is pretty nicely set overall (Can have it grant Equipment & Allies through the <UnitClass>, which is likely the main thing you'd want to hand out. Besides, can't add any tags to the XML through Python, just make it do nifty things when they pop a hut, like changing to an open chest graphic instead of clearing the tile, or spawn a Monster in a non-adjascent Tile possibly...)

woodelf
Mar 19, 2008, 04:59 PM
XML and difficulty level based. Make sure you edit that handicap file as well.

seZereth
Mar 20, 2008, 07:22 AM
Awesome!!!
finally the detail work I put into the unitgraphics pay off ;)
keep up the great work!!!

Lutefisk Mafia
Mar 20, 2008, 09:22 AM
Last night I figured out a way to code for "unidentified" items.

The sample code I put together creates a unit called an "unidentified potion."

Picking up the potion using the standard "take equipment" function gives the character the "unknown potion" promotion. At this point the character can take actions to either "drink" the unknown potion or, if they have the right mage spell or thief ability, identify the potion.

Drinking an unknown potion results in a random potion effect being generated and applied to the character. An attempt to identify, if it fails, will simply do nothing or may even ruin the potion on a critical failure. Success results in a new "identified" potion unit being created in the same tile as the character. Identifying a potion removes the "potion" promotion from the caster.

This was a bit of a work-around and isn't perfect. I tried some more direct approaches but they resulted in laggy Python code. The apparent effect in-game is that it looks like the character drops the potion on the floor after a identification attempt, whether successful or not. I can live with that. The other option was to apply potion promotions as if the character kept it in inventory, but that resulted in an effective loss of a potion if the character already had that particular promotion.

The existing "take equipment" functions appear to prevent a unit from trying to pick up more than one instance of the same piece of equipment. I like that, and this new function dovetails nicely with that effect.

This "unknown" equipment model can now be applied to other things, like weapons and scrolls.

woodelf
Mar 20, 2008, 10:15 AM
That's one of the great things in dungeon crawls...having unidentified stuff that you're dying to find out what it is. Will you have identify scrolls that can be purchased that you can use to quickly id items?

xienwolf
Mar 20, 2008, 11:13 AM
Just make sure that the Identify function doesn't count as "Already Cast" or that the Pick Up Potion function can be cast even if you "Already Cast This Turn." Otherwise it is 3 turns just to pick up an ID a potion!

zxcvbnm
Mar 20, 2008, 11:16 AM
That's one of the great things in dungeon crawls...having unidentified stuff that you're dying to find out what it is. Will you have identify scrolls that can be purchased that you can use to quickly id items?

That reminds me of some awesome luck I had in a roguelike, I picked up a random broadsword in dire need of a weapon and it appeared to be a broadsword of devastation (makes about 5 times the damage of a normal one) :D

ID scrolls, definitely!

Will this mod include outdoors too someday? It would be great fun to play FfH as an RPG but with the civs and stuff...

seZereth
Mar 20, 2008, 11:21 AM
That reminds me of some awesome luck I had in a roguelike, I picked up a random broadsword in dire need of a weapon and it appeared to be a broadsword of devastation (makes about 5 times the damage of a normal one) :D

ID scrolls, definitely!

Will this mod include outdoors too someday? It would be great fun to play FfH as an RPG but with the civs and stuff...

as soon as his base works, i think it is no problem to create some outdoor grahics ;)

Lutefisk Mafia
Mar 20, 2008, 11:55 AM
Just make sure that the Identify function doesn't count as "Already Cast" or that the Pick Up Potion function can be cast even if you "Already Cast This Turn." Otherwise it is 3 turns just to pick up an ID a potion!

Excellent point. I hadn't thought of that, but it makes good sense. I'll try to figure out a way to take care of that. I guess my preference would be to make picking up a free action, but identifying an item with a mage spell, scroll, or thief ability should require the player to take a turn or at least count as "Already Cast." Otherwise, a character could shuffle through a pile of unidentified items, identify them all, pick the right one and use it -- all in one turn.

While I'm at it, I may as well generate a "drop item" function, too. I already did that for the horses, the only difference would be that it is for an item, not a bonus.

Incidentally, does anyone remember where the code is that checks units upon death to see if they have equipment promotions? I want to make certain that if a unit carrying equipment is killed that the stuff gets "dropped" and doesn't disappear with the unit.

Lutefisk Mafia
Mar 20, 2008, 12:00 PM
That's one of the great things in dungeon crawls...having unidentified stuff that you're dying to find out what it is. Will you have identify scrolls that can be purchased that you can use to quickly id items?

Magic users will be able to choose an "identify" spell as part of their repertoire. These spells have a high rate of success. There are also scrolls that can be found (but not purchased -- but maybe a buildable item at the campsite). The scrolls are a one-time use, but are 100% successful.

Thieves can choose an "identify" skill as a class-specific promotion. The chance to successfully identify an item is scaled using the unit level as a mulitplier.

Fighter types are pretty much screwed. This is why the party has three Adventurers in it. Players choose the upgrade path for each Adventurer and will probably be prudent to have at least one Magic user or Thief.

woodelf
Mar 20, 2008, 12:15 PM
Magic users will be able to choose an "identify" spell as part of their repertoire. These spells have a high rate of success. There are also scrolls that can be found (but not purchased -- but maybe a buildable item at the campsite). The scrolls are a one-time use, but are 100% successful.

Thieves can choose an "identify" skill as a class-specific promotion. The chance to successfully identify an item is scaled using the unit level as a mulitplier.

Fighter types are pretty much screwed. This is why the party has three Adventurers in it. Players choose the upgrade path for each Adventurer and will probably be prudent to have at least one Magic user or Thief.

Sounds beautiful. :)

BeefontheBone
Mar 20, 2008, 01:59 PM
Anyway, looks great and I really like Roguelikes.
Knew I recognised that username from somewhere. Bloomin' Crawl sucking my life away :)
Totally unrelated, but I've been unable to SSH to akrasiac with PuTTY on Windows (telnet is fine) - any thoughts what I might be doing wrong?

Very excited about this - it'll be like IVaN, only, you know, fun.

Lutefisk Mafia
Mar 20, 2008, 09:46 PM
So I played around with the CvEventManager file to try to make a function to check for equipment promotions and have these item "drop" as new units upon the holder's death.

I soon realized that something is already making this happen. Where is the function that appears to already be looking for equipment promotions and making them drop?

Also, it would be nice if barbarian attackers didn't destroy the newly created equipment units -- so that the player could hope to regain them at some point. This happens for all of the potions I made, if the dying unit is the only one in the plot after being killed by a barbarian. The sequence happens awfully fast, but appears to go like:

1. Barbarian kills player unit.
2. Dropped equipment spawned at site of player's death.
3. Barbarian moves onto site of player's death.
4. Barbarian automatically destroys all new (defenseless) equipment units.

xienwolf
Mar 20, 2008, 10:37 PM
Hrm, make sure you have the unit (item) flagged as equipment. The game ought to automatically have them Capture instead of Destroy. (It'll still say they destroyed it, but then have them create one under their team instead of yours) If they are HN that could interfere with the automatic Capture though.

Lutefisk Mafia
Mar 21, 2008, 08:37 AM
Hrm, make sure you have the unit (item) flagged as equipment. The game ought to automatically have them Capture instead of Destroy. (It'll still say they destroyed it, but then have them create one under their team instead of yours) If they are HN that could interfere with the automatic Capture though.

Which flag is used for that? Are we using the "mechanized" flag to indicate equipment?

Anyway -- this happens for Healing salves, too, which I haven't messed with.

The mechanism works perfectly if the player kills a barb unit with equipment promotions, but the barbs appear to kill off equipment untis after they spawn. As a test, I plopped a player owned healing salve down next to a barb orc warrior. On the next turn, the warrior moved onto the healing salve, attacking it, and instead of capturing it, killed it without spawning a "replacement" salve of its own nationality. I also checked the warrior's promotions and, no, it did not pick up the salve.

If I can't get this to work, I may have to switch over to a "gift unit" mechanism. I'd still need to find the current "on death drop equipment" code, though, so I could disable it.

xienwolf
Mar 21, 2008, 08:48 AM
It could be a problem tied directly to the Barbarians rather than how the equipment is handled currently. Try placing some Barbarian versions of your new items and then attack them to see if it auto-captures for you. If that is the case you could make the Gift mechanism ONLY work for the Barbarians (I'd just point you at the other code, but haven't found it yet, so this would be a work-around which ought to get the proper end result, in a messy way).

Lutefisk Mafia
Mar 21, 2008, 09:33 AM
I suppose the other possibility would be to introduce the Horde as an AI player on the map who is always at war with the human. Then at least some equipment would get captured.

Seems messy though. I'll look into what you suggested. Thanks, xienwolf.

Lutefisk Mafia
Mar 21, 2008, 06:03 PM
"Take" functions for potions have been fixed. It turned out to be an easy fix. Picking up a potion no longer counts as having cast, and you may pick up potions even if you have already cast a spell or used a special ability.

woodelf
Mar 21, 2008, 07:52 PM
So have you started modding to v0.31?

Lutefisk Mafia
Mar 23, 2008, 04:08 PM
So have you started modding to v0.31?

Well, this is looking more like it will end up as a stand-alone mod. I'm calling it a "mod mod" because it will be a very heavily tweaked version of FfH2, but an offshoot nonetheless. I hope to borrow ideas liberally from both v0.30 and v0.31. In the playable version of Dungeon Adventure, however, much of the stuff that makes 031 different from 030 will be stripped out.

Civilizations? Well at least in the first version, players play as the "Guild of Adventurers." A few other civs may be in the mod to provide adversaries or allies in-game, but I don't see more than 5 civs total, plus barbs.

Civics? Totally reworked, along the lines of alignment and goals.

Spells? The magic system is different. Many of the spell are recognizeable, but lots of new stuff, too. For example, I am playing around with the idea of material components for the more powerful spells.

Cities? This is a "one city challenge" for the player.

Units? Many of the units from FfH2 are used, but you will see new ones, too.

Terrains? Pretty much all different, since the game takes place in a dungeon instead of on a world map.

So, woodelf, I'm really sure how to answer your question -- part yes and part no, I suppose?

Nonobots
Mar 23, 2008, 05:49 PM
Nethack and FFH meshed together! A dream come true!

When can we play? :D I'm dying of curiosity here. I wouldn't mind an incomplete version just to get a feel of it and provide feedback. I'm very curious about this mod (mod).

Rex rgis of Ter
Mar 23, 2008, 06:09 PM
What will you do for religions and guilds?

Lutefisk Mafia
Mar 23, 2008, 07:31 PM
What will you do for religions and guilds?

I must admit that I do not know. The dynamics of the game are quite different as a dungeon crawl than a world conquest game. Spreading one's religion in a dungeon just doesn't have the same feel. ;)

I may retain religions by having a few available at the start of the game. The player may adopt one, which gives his divine casters certain options, while closing off others. I see some sort of interplay between the civics and religion.

Guilds is a bit of a tougher call. Since the player only has one campsite throughout the game, and all AI players are either "always war" or "always peace,' guilds seem less special. I may retain them if they prove to be an easier way of introducing special units or upgrades. I may also retain them in some way just for flavor.

Any ideas? I'm certainly open to suggestions!

Psychic_Llamas
Mar 23, 2008, 07:58 PM
you should check out the Erebus online dnd campaign HERE (http://forums.civfanatics.com/showthread.php?t=251712) for ideas regarding religion etc. i think if the only difference in religion will be the divine casters spells, then i would have 1 for each angle... ie 21

Rex rgis of Ter
Mar 23, 2008, 08:08 PM
Try seven dieties, and give them all civic restrictions, but lots of abilities. i.e.

Kilmorph-
Only good, nonchaotic
Spellcasters can terraform the dungeon, and can make archways or seal them. Useful for sneak attacks and thievery of Dragon hordes.

Esus-
Nongood, nonlawful
Units can become invisible at will, and can 'assasinate'. When an invisible unit attacks a hero unit (AI's adventurers), they get a high attack and withdrawl bonus.

Amathaon-
Good
Your camp spawns nymphs, which have access to high level creation spells, allowing them to create beasts to aid in battle, multiply beasts, and create forest roadblocks.

More could be come up with for more gods.

thomas.berubeg
Mar 24, 2008, 02:34 PM
Agares
evil
gives access to the summon of powerful demons

jimi12
Mar 24, 2008, 02:50 PM
Nantosuelta - Not evil. access to the best equipment in the game. possible access to golems

succellus - not evil. could gain one time immortality promotion on heroes. bonus vs undead

Lutefisk Mafia
Mar 24, 2008, 10:00 PM
When can we play? :D I'm dying of curiosity here. I wouldn't mind an incomplete version just to get a feel of it and provide feedback. I'm very curious about this mod (mod).

At this point it would be very incomplete.

I am still working on basic mechanics -- and now have FfH2 031 to look at, too.

But I am hoping that a very stripped down, primitive version can be made available for feedback in a few weeks. (I only have an hour or so each day to spend on modding :sad:)

When I have a playable demo, I will most likely post it in the Modpack forum.

In the meantime, please keep checking back to this thread -- I will post updates on progress.

Lutefisk Mafia
Mar 24, 2008, 10:05 PM
I spend my modding time today introducing some better buttons for the unique features in the WorlBuilder. I got sick of re-using the "oasis" icon for everything. All of the N-S-E-W door variations and the altar feature have unique buttons now.

http://img186.imageshack.us/img186/3839/buttonswh1.jpg

The "take horse," "drop horse," and "search" actions now have unique buttons, too. (Shown pasted together -- you would not normally see the "take" and "drop" button at the same time)

http://img527.imageshack.us/img527/5489/buttons2ug5.jpg

For the next day or so I will be backfilling on TXT entries and expand the "take" and "drop" functions to cover more things.

zxcvbnm
Mar 25, 2008, 09:05 AM
Knew I recognised that username from somewhere. Bloomin' Crawl sucking my life away :)
Totally unrelated, but I've been unable to SSH to akrasiac with PuTTY on Windows (telnet is fine) - any thoughts what I might be doing wrong?

Very excited about this - it'll be like IVaN, only, you know, fun.
?????????????????????????????????????????????????? ???
:confused::confused::confused::confused::confused: :confused:
:confused::confused::confused::confused::confused: :confused:
:confused::confused::confused::confused::confused: :confused:

Psychic_Llamas
Mar 25, 2008, 10:10 AM
im itching to try this out, ah looks so cool :p

Lutefisk Mafia
Mar 26, 2008, 09:06 AM
Cleaned up a few more action buttons. The potion of command and unknown potion now have unique buttons in the interface.

I also settled on how to implement altars. Occassionally in the game, you may stumble across a stone altar. The altar may or may not have an aura about it, either good or evil. Praying at these altars can have different effects depending on the aura of the altar and the alignment of the player.

Also, the aura disappears after a player has prayed at the altar. It is possible to "recharge" an altar with an aura, but more on that later.


Altar with evil aura on the left, good on the right. Sickly stink rays means evil! Shiny sparkly blue stuff means good!
http://img397.imageshack.us/img397/4369/altarspm2.jpg

woodelf
Mar 26, 2008, 09:19 AM
Nice. Looks very cool.

xienwolf
Mar 26, 2008, 09:53 AM
Looks way awesome. Even though your scout doesn't have the Single-Unit graphics :p

When you do get a release Version you really do need to make a thread in the main Mod section, since this will be a complete mod that is just based on FfH code/artwork. I imagine MANY people will want to play this, and it may even recruit some new people to FfH as a side result :)

Lutefisk Mafia
Mar 26, 2008, 10:40 AM
When you do get a release Version you really do need to make a thread in the main Mod section, since this will be a complete mod that is just based on FfH code/artwork. I imagine MANY people will want to play this, and it may even recruit some new people to FfH as a side result :)

Yes, that's the plan. I originally started this thread here because of the huge debt owed to the FfH2 team. (Especially since I am shamelessly borrowing so much FfH2 graphics and code!) I could not possibly have started this project without having had the benefit of looking at the FfH2 XML and Python files to see how it is done. Once I have a playable pre-Alpha version, I intend to release it and migrate to a new thread in the Modpacks sub-forum.

And if I can attract more people to the goodness that is FfH2, so much the better!

seZereth
Mar 26, 2008, 10:57 AM
we have a great FfH community with a huge treasury of Ideas, so its probably not a bad idea to start out here :)

keep up the great work!

zxcvbnm
Mar 26, 2008, 12:47 PM
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.

Lutefisk Mafia
Mar 26, 2008, 10:09 PM
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.

Lutefisk Mafia
Mar 26, 2008, 10:19 PM
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:

http://img264.imageshack.us/img264/5628/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!

xienwolf
Mar 26, 2008, 11:12 PM
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...

zxcvbnm
Mar 27, 2008, 07:30 AM
Good ideas xienwolf, like usual

Lutefisk Mafia
Mar 27, 2008, 01:19 PM
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!

Deon
Mar 27, 2008, 01:26 PM
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 =)).

Lutefisk Mafia
Mar 27, 2008, 08:25 PM
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.)

xienwolf
Mar 27, 2008, 08:44 PM
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)

Lutefisk Mafia
Mar 27, 2008, 09:02 PM
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.

Tyrs
Mar 27, 2008, 09:05 PM
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.

MagisterCultuum
Mar 27, 2008, 09:06 PM
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.

Lutefisk Mafia
Mar 27, 2008, 09:13 PM
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.

xienwolf
Mar 27, 2008, 11:00 PM
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.

Psychic_Llamas
Mar 28, 2008, 01:39 AM
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...

MagisterCultuum
Mar 28, 2008, 01:48 AM
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.

mtagge
Mar 28, 2008, 05:10 AM
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.

Lutefisk Mafia
Mar 28, 2008, 08:56 AM
@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.

Lutefisk Mafia
Mar 28, 2008, 12:57 PM
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:

http://img223.imageshack.us/img223/2073/trapgg5.jpg

Ekolite
Mar 28, 2008, 01:18 PM
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.

Grey Fox
Mar 28, 2008, 01:51 PM
Nice work. Once I finish my Advance Wars mod I will continue work on my civrpg mod and I might use some of your work in that once I start working on it again.

My game will be mostly outdoors, but I plan to add a map switching feature to my mod so I could add dungeons which you can enter etc. Not promising anything about that, but I need that feature in my campaign mode for AdvWars so I'll know before I start working on civrpg again if I can include dungeons.

My mod have no civilization or city management, just character development with all that usually comes with digital RPGs. Inventory screen, equipment, attributes, quests, monsters and heroes.

I just wished I had a connection at home so I could put together a team once I get to content development. I will need writers (for storymode), artists (3D and 2d) and designers (idea-comer-up'ers), and possibly programmers (but I'll do most of that myself, as well as the above jobs).

Atm I have Jono and Chandrasekhar on the team, but the project has been dormant for a while mostly cause I have no internet connection.

Anyways, I'll be following this project.

Lutefisk Mafia
Mar 28, 2008, 07:32 PM
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.

The pillar of fire spell has Python code that prevents the casting unit from hitting itself or other friendlies. I haven't figured out a way to short-circuit this without causing other problems, such as:

1. Very laggy python code.
2. Traps deciding to blow themselves up for no reason.
3. Traps blowing up other barb units.

Here is the Pillar of Fire def req python below, which I have repurposed for traps:

def reqActivateTrap(caster):
iX = caster.getX()
iY = caster.getY()
pPlayer = gc.getPlayer(caster.getOwner())
iTeam = pPlayer.getTeam()
eTeam = gc.getTeam(iTeam)
for iiX in range(iX-1, iX+2, 1):
for iiY in range(iY-1, iY+2, 1):
pPlot = CyMap().plot(iiX,iiY)
bEnemy = false
bNeutral = false
for i in range(pPlot.getNumUnits()):
pUnit = pPlot.getUnit(i)
if eTeam.isAtWar(pUnit.getTeam()):
bEnemy = true
else:
bNeutral = true
if (bEnemy and bNeutral == false):
return true
return false

I cannot for the life of me understand how this is working. It does prevent the spell from being castable until there is an enemy unit within range that does not share a tile with friendlies. So, it DOES work, but the code contains too many double negatives for me to keep track of the logic. I tried to parse it again last night, but that last condition with the bEnemy and bNeutral throws me off.

If someone could explain to me exactly what this is doing and HOW, I could probably figure out a way to change traps to activate on their own tile only.

Here was my attempt for a new def req (it is commented out in the example below):

#def reqActivateNewTrap(caster):
# pPlayer = gc.getPlayer(caster.getOwner())
# iTeam = pPlayer.getTeam()
# eTeam = gc.getTeam(iTeam)
# pPlot = caster.plot()
# for i in range(pPlot.getNumUnits()):
# pUnit = pPlot.getUnit(i)
# if pUnit.getTeam() != eTeam:
# return true
# return false

All this accomplished was to make the game very laggy and make traps not work at all. I thought it would simply detect if an enemy unit was on the same plot as the trap unit, and not care if friendlies or neutrals were also present. Apparently not!

Again, commentary and observations on the code examples above are welcomed!

Grey Fox
Mar 28, 2008, 07:41 PM
if bEnemy is practically short for "if bEnemy == true", it's not "if bEnemy AND bEnemy both False"

The statement could have been written like this as well:
if ((bEnemy) and (not bNeutral)):

Lutefisk Mafia
Mar 28, 2008, 08:01 PM
And a few minutes after I made that last post, i looked at the code again and though... "Huh. I wonder if THIS would work."

IT DID! :D

I now have traps that will trigger if an enemy steps on the tile, regardless of whether friendlies are also present. And the traps do not trigger prematurely, or if friendlies only enter the tile. And they only apply the damage effect to units on their own single tile.

By using this code and the code I was using before, I now have two flavors of traps: single tile trigger and effect traps -- and area trigger and effect traps.

Dungeon Adventure just got a little more interesting!

xienwolf
Mar 28, 2008, 08:20 PM
Number 1 Reccomendation: use [ code ] [ /code ] when you post code :P It is hard to read quickly without the indentations ;)

My take on the code, could easily be wrong/missing something.

def reqActivateTrap(caster):
iX = caster.getX()
iY = caster.getY()


This part stores the tile that the caster is located on


pPlayer = gc.getPlayer(caster.getOwner())
iTeam = pPlayer.getTeam()

This establishes which player cast the spell and who is on his team.

eTeam = gc.getTeam(iTeam)

This establishes who all the other players are in the game.

for iiX in range(iX-1, iX+2, 1):
for iiY in range(iY-1, iY+2, 1):


This says that it is going to look at all the tiles in the 3x3 grid centered on the caster.

pPlot = CyMap().plot(iiX,iiY)
bEnemy = false
bNeutral = false

This initializes the variables to state that, should nothing further be done with the code, the computer should assume there are no enemies and no neutral units on the tile it is currently checking.

for i in range(pPlot.getNumUnits()):

This sets up to check each unit on the plot, 1 by 1.

pUnit = pPlot.getUnit(i)
if eTeam.isAtWar(pUnit.getTeam()):
bEnemy = true
else:
bNeutral = true



This says that if one of those units belongs to a player who is at war with you, then it is an enemy. But if it belongs to a player who is NOT at war with you, then it is Neutral.

if (bEnemy and bNeutral == false):
return true

This will return a true value if none of the units on the tile were friends or enemies. Which is impossible, thus it returns the value of true if the tile was empty, or only contained your own teams units.

return false

And if the last check didn't work (ie - there is any unit not belonging to your team in that 3x3 grid), this one returns a false.



As for the code you have #'d out, the problem I see with it is the line:

# if pUnit.getTeam() != eTeam:

You are checking only the tile that the caster himself is on, and you are checking for EVERY unit, to include the caster. Thus the caster himself will always trigger this one to return a True.

kenken244
Mar 28, 2008, 09:02 PM
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.

Ranged attacks are actually very simple to implement, You just need to give a non-air unit air combat and air range values. the damage is dependant on the air combat and collateral damage based on it's regular collateral damage numbers. it's basically the same as bombing missions but it uses a different button, can't be intercepted, and is blocked by some terrains.

Lutefisk Mafia
Mar 28, 2008, 10:51 PM
Number 1 Reccomendation: use [ code ] [ /code ] when you post code :P It is hard to read quickly without the indentations ;)

Noted! Do the indents make any difference in how the game engine interprets the code? I thought they were just for ease of human reading, but if I'm wrong on that, that could explain a lot of my errors.


pUnit = pPlot.getUnit(i)
if eTeam.isAtWar(pUnit.getTeam()):
bEnemy = true
else:
bNeutral = true



This says that if one of those units belongs to a player who is at war with you, then it is an enemy. But if it belongs to a player who is NOT at war with you, then it is Neutral.

So it doesn't try to process the caster's own units?



if (bEnemy and bNeutral == false):
return true

This will return a true value if none of the units on the tile were friends or enemies. Which is impossible, thus it returns the value of true if the tile was empty, or only contained your own teams units.

Wait, doesn't return true mean that the spell can be cast? Under this interpretation, the spell could only be cast if a nearby tile is either totally empty or full of only your own team's units. This is where I'm getting tripped up. Because in-game, the spell can only be cast if there is a tile in range that contains only enemy units.

Lutefisk Mafia
Mar 28, 2008, 10:59 PM
In any event, I now have single tile traps working fine, except that the "trap sprung" interface message never appears. The unit damaged message does appear, though. I think it is because the python is trying to put two messages in the same space, so it just does the first message.

Area traps work perfectly -- both the damage message and the "trap sprung" message appear. The damage message appears on the activating unit, the "trap sprung" message appears on the trap tile.

I am also implement a special type of trap called a "glyph." These traps cast spells upon activation. Great for summons, and blinding light, etc. For some reason, the "trap sprung" message never appears for these either, despite the fact that they, too, are a form of area trap. The message associated with the spell cast does show up, though.

Very puzzly!

Grey Fox
Mar 28, 2008, 11:28 PM
Read my post again Lutefisk ;)

if bEnemy is practically short for "if bEnemy == true", it's not "if bEnemy AND bEnemy both False"

The statement could have been written like this as well:
if ((bEnemy) and (not bNeutral)):

xienwolf
Mar 29, 2008, 12:24 AM
Ah I see, the == only applies on the second one, so there was an implied == True on the bEnemy tag. Thus it returns the True value if there is an enemy, but no Neutrals :) Cute :p

I had realized that a True seemed just flat out wrong for my case, but assumed it may have been a "Cannot cast" entry, since you find those sometimes in the python as well.

Not sure if the Python relies upon the tabs to be honest.

MagisterCultuum
Mar 29, 2008, 01:47 AM
Python relies very heavily on tabs. In python, everything in a function, conditional, loop, etc., must be indented once more than the opening statement. For example,
def reqActivateTrap(caster):
iX = caster.getX()
iY = caster.getY()
pPlayer = gc.getPlayer(caster.getOwner())
iTeam = pPlayer.getTeam()
eTeam = gc.getTeam(iTeam)
for iiX in range(iX-1, iX+2, 1):
for iiY in range(iY-1, iY+2, 1):
pPlot = CyMap().plot(iiX,iiY)
bEnemy = false
bNeutral = false
for i in range(pPlot.getNumUnits()):
pUnit = pPlot.getUnit(i)
if eTeam.isAtWar(pUnit.getTeam()):
bEnemy = true
else:
bNeutral = true
if (bEnemy and bNeutral == false):
return true
return false is quite wrong. First, the define itself must be indented once for it to be a part of class (whatever file it is in). (Edit: I just noticed that in the spells file defines are not indented, unlike in the custom functions, event manager, ect. So you probably should unindent the "right" code once.) Then, everything in it must be indented to be part of the define. Likewise things in the for loops must be indented if they are to be included in the portion of the code to be iterated. "If" statements do the portion of the code below that is indented, and then do unindented lines anyway. The same goes for "else," which I'm pretty sure is meaningless unless it comes immediately after an if (or elif) statement ends. Almost everything in this code would cause a serious error if not properly indented.

The right way is:
def reqActivateTrap(caster):
iX = caster.getX()
iY = caster.getY()
pPlayer = gc.getPlayer(caster.getOwner())
iTeam = pPlayer.getTeam()
eTeam = gc.getTeam(iTeam)
for iiX in range(iX-1, iX+2, 1):
for iiY in range(iY-1, iY+2, 1):
pPlot = CyMap().plot(iiX,iiY)
bEnemy = false
bNeutral = false
for i in range(pPlot.getNumUnits()):
pUnit = pPlot.getUnit(i)
if eTeam.isAtWar(pUnit.getTeam()):
bEnemy = true
else:
bNeutral = true
if (bEnemy and bNeutral == false):
return true
return false





(No, spaces won't work, and telling them apart can get really annoying sometimes. Also, having a space before a tab can sometimes throw things off. What is worse is that IDLE's proposed solution to this is to change every tab into spaces and make you go through every line yourself. You should really edit it in notepad, notepad2, notepad++, etc, which allow you to show the spaces and tabs.)



If this was C++ then the tabs would be irrelevant (only there to make it easier for us to read), because it relies on {} instead. I believe that line endings are also pretty meaningless here.

The Same is true of XML (except for the {} would be more like </>, and it isn't really a programming language)

Lutefisk Mafia
Mar 29, 2008, 11:40 AM
:Read my post again Lutefisk ;)

The light finally went on. I think I get it now.

The implicit logic to that line of code is:

if (bEnemy == true) and if (bNeutral == false):

Right?

I was thinking it was:

if (bEnemy == false) and if (bNeutral == false):

which was why I was so confused. I realize that the code is nice and consise, but in this instance it could have been written more explicitly. I am a big fan of verbose code for mods -- it makes it easier for noobs like me to figure out what the code is doing!

Thanks to you for squaring me away!

BeefontheBone
Mar 29, 2008, 11:48 AM
The implicit logic to that line of code is:

if (bEnemy == true) and if (bNeutral == false):

Right?
Yup. If you're used to conflating 1 with true and 0 with false it's a little clearer - those binary flags are tricksome beasties! :D

Lutefisk Mafia
Mar 29, 2008, 11:52 AM
Python relies very heavily on tabs. In python, everything in a function, conditional, loop, etc., must be indented once more than the opening statement.

Oh!!!

This is a VERY good thing to know! The only other significant programming I have done was in a type of JavaScript, in which indents are cosmetic only. I also programmed in Basic and APL, but that was back in the day of GOTO and GOSUB.

Thank you for straightening me out, MagisterCultuum. This should reduce my coding frustration significantly.

FWIW, the code I posted got left-justified because I forgot to use the CODE tags. It had tabbed indents, but now I need to go back and examine them to see if they made sense.

Lutefisk Mafia
Mar 29, 2008, 11:59 AM
So here is the def reqcode I am currently using for single tile traps:

def reqActivateTrap(caster):
iX = caster.getX()
iY = caster.getY()
pPlayer = gc.getPlayer(caster.getOwner())
iTeam = pPlayer.getTeam()
eTeam = gc.getTeam(iTeam)
for iiX in range(iX-0, iX+1, 1):
for iiY in range(iY-0, iY+1, 1):
pPlot = CyMap().plot(iiX,iiY)
bEnemy = false
bNeutral = false
for i in range(pPlot.getNumUnits()):
pUnit = pPlot.getUnit(i)
if eTeam.isAtWar(pUnit.getTeam()):
bEnemy = true
# else:
# bNeutral = true
# if (bEnemy and bNeutral == false):
if (bEnemy == true):
return true
return false

If I understand the previous discussion correctly, this version should work, too:

def reqActivateTrap(caster):
pPlot = caster.plot()
pPlayer = gc.getPlayer(caster.getOwner())
iTeam = pPlayer.getTeam()
eTeam = gc.getTeam(iTeam)
bEnemy = false
for i in range(pPlot.getNumUnits()):
pUnit = pPlot.getUnit(i)
if eTeam.isAtWar(pUnit.getTeam()):
bEnemy = true
if (bEnemy == true):
return true
return false

The purpose of the above code is to make the spell castable only if an enemy is on the same tile as the caster, regardless of the presence of friendly or neutral units.

Comments?

Grey Fox
Mar 29, 2008, 12:06 PM
:

I am a big fan of verbose code for mods -- it makes it easier for noobs like me to figure out what the code is doing!

Yeah I am a fan of verbose code as well and python seems to have been designed to basically work as a pseudo-code (http://en.wikipedia.org/wiki/Pseudocode) like programming language.

Instead of && it has and , instead of ! it has not,etc

Even the For loop has been made to be more understandable. Instead of C's for(i=0,i < x,i++) it has the for x in range(range), which even makes a sentence when read. If the programmer is aware of this and put some effort down you can write very easy read code.

An example:


#Example check function
def isNotAI(iPlayer):
'Returns true if iPlayer is human'
pPlayer = gc.getPlayer(iPlayer)
if pPlayer.isHuman():
return true
return false

#Then our actual code
bDone = false
while not bDone:
for iPlayer in gc.getNumPlayers():
if isNotAI(iPlayer):
#Do Something
bDone = True

MagisterCultuum
Mar 29, 2008, 12:10 PM
In the first version the second to last if statement won't do anything regardless.

If you don't care about friendly or neutral units, why not just get rid o the bEnemy variable and just put the return true statement in "if eTeam.isAtWar(pUnit.getTeam()):" instead? The code would be faster that way, as it would stop checking the units on the tile once it finds a single enemy.

Lutefisk Mafia
Mar 29, 2008, 01:26 PM
In the first version the second to last if statement won't do anything regardless.

You mean the lines that are commented out? Yeah, I know... I leave bread crumbs for myself like that when I'm fiddling with code. It helps me revert to earlier versions when I screw things up.

If you don't care about friendly or neutral units, why not just get rid o the bEnemy variable and just put the return true statement in "if eTeam.isAtWar(pUnit.getTeam()):" instead? The code would be faster that way, as it would stop checking the units on the tile once it finds a single enemy.

So, like this:

def reqActivateTrap(caster):
pPlot = caster.plot()
pPlayer = gc.getPlayer(caster.getOwner())
iTeam = pPlayer.getTeam()
eTeam = gc.getTeam(iTeam)
for i in range(pPlot.getNumUnits()):
pUnit = pPlot.getUnit(i)
if eTeam.isAtWar(pUnit.getTeam()):
return true
return false

I like it, nice and crisp.

MagisterCultuum
Mar 29, 2008, 01:40 PM
The For loop (starting with the for statement and including everything in it) is indented once too much.

Psychic_Llamas
Mar 29, 2008, 10:18 PM
ive got a question:

I need help with a certain spell that i want to make for the Warhammer mod, which uses ffh code for spells. after reading about these traps that lutefisk is making, i had a sudden brain wave. is it at all possible to d othe following for a spell:

Comet of Cassandora:
this spell shoud summon a permanent, invisible, single tile trap unit which is allied to the caster.
the single tile trap, should have a % chance of being 'set off' each turn, regardless of if there is an enemy on it, and if an enemy steps on it, it should be set off immediately regardless. it damages all units, friend and foe.
then it is set off, either by the % chance or being stepped on, it should cast a direct damage spell that does a small ammount of damage.
however, every turn that the comet trap exists, the Damage level should increase, and every 2 turns the area of effect should increase by one square, until after 6 turns the trap is automatically set off (ie chance of setting off change to 100%).

numerically i would like it to be like this:
turn 1: 15% fire damage to any unit directly on top of the comet trap. 10% chance of setting off.
turn 2: 30% fire damage to any unit directly on top of, or adjacent to the comet trap. 20% chance of setting off.
turn 3: 45% fire damage to any unit directly on top of, or adjacent to the comet trap. 40% chance of setting off.
turn 4: 60% fire damage to any unit directly on top of, or within 2 squares of the comet trap. 60% chance of setting off.
turn 5: 75% fire damage to any unit directly on top of, or within 2 squares of the comet trap. 80% chance of setting off.
turn 6: 90% fire damage to any unit directly on top of, or within 2 squares of the comet trap. 100% chance of setting off.

my question then is, how would i make the comet trap change the % chance, ammount of damage, and spell area each turn? is it even possible?

if yes, could someone please provide me with the code that should make it work? and where should i put the code? im almost entirely python illiterate:p

sorry for hijacking this thread Lutefisk :p

EDIT: i realise im asking a lot here, but one can always hope ay? ;)
EDIT 2: lutefisk, how does your trap promotion work?

MagisterCultuum
Mar 29, 2008, 10:48 PM
I'm pretty sure it is possible.

The % chance seems like it should use use an pyPerTurn effect, which would actually be promotion dependent rather than unit specific.

It would probably make sense to check in CvEventManager and call the same effect if a unit tries to enter a tile with such a unit (checking similar to how treants work)



Hmmm...for added range/damage, how about making the unit gain free xp, and basing the range and damage amounts depend on its xp? This would require python of course, with the exact range/damage amounts hardcoded. You could also have the pyPerTurn effect look at its amount of xp for the chance of going off, combined with a random number generator.


You could also make these units gain free promotions (one promotion could randomly give another, py effect could add them, or you could just make this line of promotions the only ones available to a new unitcombat_trap) which might be able to let you make the damage spell itself not rely on python at all. Promotions can change the amount of spell damage a caster can do, but not range (I really think Kael needs to make extension boost range, which would make your request easier)

Lutefisk Mafia
Mar 29, 2008, 10:56 PM
@Psychic_Llamas:

No worries on hijacking! I like to hear about interesting ideas!

As far as your spell goes, it would be complex, but doable, I think.

The first part is just a summon of a special unit. Easy enough.

For the rest of it, you would need to have a python script that the unit checked each turn, and that could keep track of how many turns had passed since creation.

The other option, more complex, is to have a series of promotions that change the characteristics of the unit.

For example, the unit starts with the "Comet" promotion. This allows the unit to cast a unique spell called "Imacomet." It also starts with Combat1

The python for the "Imacomet" spell would have a series of "if" statements that check for certain promotions and take different actions accordingly.

So the first "if" statement could look for the "combat1" promotion, and if it does exist, the unit would take action against eligible units within a set radius for a given result of a "random roll."

The next "ifs" would check for combat2, combat3, etc. with their scaled resulting actions.

After checking for the appropriate action, depending on the Combatx promotion, the code would check for "growth." The code would check for promotions again, but in descending order, first combat5, down to combat 1. If it finds a given level of promotion, it takes action to remove that promotion, and award the next higher one instead. This could be 100% likely to happen or have a % chance to happen.

And then the loop ends.

You would not need a req def, since the spell is cast every turn. One of the checks in the spell itself could check to see if there is an enemy unit on top of the comet. If so, the chance to "blow up" would be set at 100%. In fact once of the initial variables could be defined as

iBlowup = 0

And iBlowup would change to 100 if an enemy unit is on top of the comet. It would change to a given number for each level of growth of the cmet, too.

Well, that's just my two cents. Complex idea, indeed, but I think it can be done!

MagisterCultuum
Mar 30, 2008, 12:15 AM
Well, your way it would blow up if there happen to be other units on the same tile whenever the pyPerTurn function ran. I believe that means that units could still move through the tile safely if they don't stop there, or if you get lucky. If you want t to happen as soon as a unit moves into the tile, you would need a check in def onUnitMove(self, argsList):

Psychic_Llamas
Mar 30, 2008, 01:14 AM
hmmm

so, let me see if i understand this:

the comet unit would start with "imacomet" (or whatever) promotion, and when the python sees this promotion it ausomatically grants that unit a combat promotion each turn untill it is upto combat 5.
as this happens, python would check to see if a unit has 'imacomet' and combat 1, if it does it causes a 10% chance for the unit to blow up causing damage to units on top of it only. it would then check for imacomet +Combat 2, and if it finds any then it would cause a 20% chance that it blows up damaging units on top of it a bit more. continues on until it checks for imacomet+combat 5, when it causes 100% detonation and damages all units within 2 squares of it significantly.

is that about right?


would an easyer way be to make the spell create an improvement called 'Comet I' which automatically upgrades to 'comet II' on the next turn, and then comet II upgrades to comet III etc. like the tower/castle/fortress mechanism but much faster.

python would then run the checks for % chance detonation and then cause the damage and area of effect for each improvement level? the problem here would be that it wouldnt be invisble, but i dont really mind if it is invisible or not, im pretty sure a horde of orcs would see a massive comet hurtling towards them, dont you? :p


and heres a thought, if i get this to work Lutefisk could use it for timed traps which rogue heros could build :p

Lutefisk Mafia
Mar 30, 2008, 07:51 PM
Yes, I am still obsessing with my traps.

I changed them over to a onUnitMove function in the CvEventManager file, and I am much happier with the way they work. Traps now trigger as soon as you step on them -- right in mid-turn.

I will do this for Glyphs, too.

I am next going to polish off some interface graphics and sound for these items.

Anybody know a good WAV file editor? I am trying to add some dead air to the beginning of a certain WAV file, so that I can repurpose it to a new use.

EDIT: I downloaded Audacity. Works like a charm! Now my "permanent" traps and Glyphs have a tell-tale "reset" sound to let the player know something is up.

civ_king
Mar 30, 2008, 07:55 PM
Heads up FYI D&D V4 is coming out this summer :)
me and my friends play (we are only 12-16 hehe)

Lutefisk Mafia
Mar 30, 2008, 09:09 PM
Heads up FYI D&D V4 is coming out this summer :)
me and my friends play (we are only 12-16 hehe)

I still have my old V1 AD&D books, copyright 1979. In fact I use the old Dungeon Masters Guide and Players Handbook for ideas. Gotta love the old DMG with the picture of the Efreet on front.

Lutefisk Mafia
Mar 30, 2008, 11:09 PM
It is nice to have this done and working the way I want. A screen shot is below:


http://img296.imageshack.us/img296/2092/finaltraps0000yw9.jpg

This image is from WorldBuilder view, so the hidden units are visible. The first room holds a trap, and the room further in holds a glyph.

Traps can be:
1. single tile traps that trigger on their own tile only or
2. area traps that trigger on their own tile and within a radius of one tile.

Trap units come with free "trap" and "hidden" promotions. If you want a trap to be an area trap, you go into Worldbuilder, remove the "trap" promotion, and give the trap the "area trap" promotion instead.

Traps have different effects, depending on whether they are given additional promotions. The default, if there is no additional promotion, is that the trap is a purely mechanical trap that does physical damage. I used certain mana promotions, like death1, to flag for other damage types. Accordingly, a trap can deal out any of the 8 damage types, but it can only inflict that one type, not multiple types.

Traps can also be given the "defensive" or "rusted" promotions. (Currently, these are stand-ins for trap-specific promotions that will have the below listed effects.)

The "defensive" promotion makes the trap "rehide" itself after each triggering. I'll probably make a new promotion called "concealed" to cover this function at some point. Traps without this promotion reveal themselves after the first triggering. A revealed trap can be rushed by a unit -- traps have low strength, but cause extra physical damage and explode on combat. This is the crudest way to remove a trap, but only works on traps that have been revealed.

The "rusted" promotion causes a trap to destruct after being triggered. This is to designate a "one-use" trap. I'll probably make a new promotion for this function called "disposable" or something like that. (Right now, it is technically possible for spell casters to junk traps by casting rust on them! Hmnn. Maybe I'll keep it that way.)

Glyphs are always "area trigger" units. They cast spells instead of inflicting a damage type directly. In a sense, they are like magical traps. Glyphs can have the "defensive" and "rusted" promotions just like traps, and they have the same effects.

Took me a while to get the interface messages to display correctly but that is done. I also rigged up some sound effects that get added on to the traps that re-conceal themselves -- sort of a "reset" sound that happens a bit after the main activity. I added this as an auditory clue to the player to let them know that they are dealing with a persistent trap instead of a disposable one.

Well, that's all for this update. I think my next focus will be to extend the "grab" and "drop" functions to more bonuses than just horses. I plan to make these bonuses important for enabling upgrades. Since this is a "one city" type of game, the player will have to find these resources and then carry them back to the cultural radius of the campfire (city). Some bonuses may also be needed as material components for the more powerful spells!

'Til next time!

Lutefisk Mafia
Mar 31, 2008, 02:29 AM
I goofed around with some art today -- and made the main and loading screens. Here is a screenshot of the loading screen:


http://img113.imageshack.us/img113/4179/loading0000pg6.jpg

I'm trying to give the mod an old Pencil and Paper D&D feel.

Hope you like it!

mtagge
Mar 31, 2008, 04:30 AM
@mtagge: You are hired!
Sorry for leaving you hanging over the weekend, I don't have access to the Internet at home, and we have half day Fridays. :(

Let me know if you still need help with the trap code by PM, but it sounds like you already have it taken care of. If it helps, feel free to take a look at my code posted in the conditional promotion thread, and I might also recommend the code in Final Frontier for damage based on tile hazards.

Psychic_Llamas
Mar 31, 2008, 04:44 AM
Excelent stuff! i really am dying for a play test version of this :D

blackCat
Mar 31, 2008, 04:53 AM
Excelent stuff! i really am dying for a play test version of this :D

:goodjob::goodjob::goodjob::goodjob::goodjob:

I think the same !!

When shall we can play test ??

:goodjob::goodjob::goodjob::goodjob::goodjob:

woodelf
Mar 31, 2008, 05:03 AM
I'll 3rd that. I want to play!

The best part of games like these were the HoF and seeing how far your different games progressed until your Hero died. :D

Lutefisk Mafia
Mar 31, 2008, 09:53 AM
I'll 3rd that. I want to play!

The best part of games like these were the HoF and seeing how far your different games progressed until your Hero died. :D

I am going to try to make this an escalating game, like rogue. It won't have multiple levels, of course, but stuff will re-spawn on the map from time to time. I am hoping to hijack and repurpose the Armageddon Counter to make it act as a sort of "let's gradually increase the difficulty" ticker. Depending on the AC, different monsters, goodies, and traps will spawn. The more baddies you kill and good stuff you find, the higher the AC gets.

Eventually, it will get so difficult that the Heroes will almost certainly die. The fun is to see how far you can get. Like rogue, this will most often be a 15-30 minute game from start to finish, maybe a bit longer.

xienwolf
Mar 31, 2008, 09:56 AM
Sweet work all around Lute :) But could you use [ spoiler ] [ /spoiler ] tags around your images, or reduce the size a bit, for people who have their browsers on slightly lower resolutions? (Though I always thought I had mine fairly large. Must be the small screen :))

Psychic_Llamas
Mar 31, 2008, 10:16 AM
the armageddon replacment sounds like fun! i might actually play with it enabled! :wow:

woodelf
Mar 31, 2008, 10:18 AM
I am going to try to make this an escalating game, like rogue. It won't have multiple levels, of course, but stuff will re-spawn on the map from time to time. I am hoping to hijack and repurpose the Armageddon Counter to make it act as a sort of "let's gradually increase the difficulty" ticker. Depending on the AC, different monsters, goodies, and traps will spawn. The more baddies you kill and good stuff you find, the higher the AC gets.

Eventually, it will get so difficult that the Heroes will almost certainly die. The fun is to see how far you can get. Like rogue, this will most often be a 15-30 minute game from start to finish, maybe a bit longer.

So each random map will be played until the Hero dies? Gotcha. I was wondering if it was like that or if each map was finite and once finished the Hero could then be exported into a new map (game) somehow. I just can't wait to see the HoF! How many categories can you have? Most kills? Highest Lvl Hero? Most items recovered?

mtagge
Mar 31, 2008, 11:52 AM
Are you going to be keeping with the CIV IV combat method throughout this entire mod (i.e. all combats are fatal to one of the two parties) or do you plan on implementing some way so that each attempt at combat will be interrupted and replaced with some sort of a strike that does a certain amount of damage and may or may not actually land?

If you keep with the original way of doing damage I imagine that it could end up being a short game indeed more frequently than desired. Shouldn't be too hard to do in python. The other workaround I would suggest for some of the mobbing tactics would be to implement a stacking limit. Interrupt the canMove function to prevent movement to a space with a friendly model (or whatever the limit is).

Just throwing out ideas, feel free to call me crazy. I might mess around with some code of that sort as I get free time during the week. Maybe make the unit's level determine the chance to connect, the combat strength determine the damage and setup some promotions to affect each of the numbers.

Lutefisk Mafia
Mar 31, 2008, 01:20 PM
@woodelf: I'd love to figure out how to export information from a "finished" level to a new map. There has been talk about that elsewhere in these fora but to my knowledge, no one has pulled it off yet. So -- Dungeon Adventure will ikely be a single map thing at first. But it could be a single player on a huge map. That provides plenty of real estate to explore.

As far as maps being random -- I am totally at the mercy of the benevolence of a map scripter to accomplish that. It would be great to come up with a map script that spat out dungeons, but I have no clue how to do that. At least in the beginning, maps will be hand made in WorldBuilder. But people can make map/scenarios and trade them around, so it won't be too terrible. I am trying to make a solid, easy to use schema for WorldBuilder so that it will be painless to make these dungeons.

@xienwolf: Oops. Yes, I will use spoiler tags for my big images. Those are screen shots off of a widescreen LCD, so the aspect is a bit, well, huge. I suppose I could rescale them, too.... but that sounds like work! :p

@mtagge: I'll probably keep the Civ4 combat model. The player starts with 3 adventurers, and as the campsite accumulates Great Person points, more adventurers will join the party. The player can also sometimes capture and convert "monster" units, and will have the ability to build or recruit "cannon fodder" units to help the main party. Don't forget that wizards have summonables, too. In all, the player will need to be a bit more strategic about what monsters to attack and when.

woodelf
Mar 31, 2008, 01:24 PM
Maybe cephalo can help with a mapscript?

Lutefisk Mafia
Mar 31, 2008, 01:30 PM
Just a quick note to other modders out there:

If you are designing a mod, one of the essential components is the artwork, since this is what the player sees the whole time. Modders like me can kludge our way through coding, but artwork is not my strong suit.

Never fear! There are two great sources for art that is okay to use.

1. The Civfanatics forum. The modding fora are full of unit models, interface buttons, and other goodies. Courteous practice is to ask the creator if it is okay to use it in your mod. I've never had anyone say "no," usually they just ask to have their contribution acknowledged (which is the right thing to do anyway).

2. Royalty free art sources. Things like clip art, etc. For the splash screen for my mod, I paid a few bucks for a collection of fantasy artwork that specifically states that it is royalty free and okay to use for whatever. Some RPG gaming stores have these resources for book authors or fan newsletters. These are wonderful for people like me. I can use GIMP well, and pasting things together, then blending them and tweaking them, is something that I CAN do.

There are other sources out there, too, but I thought I'd give these two mention.

Lutefisk Mafia
Mar 31, 2008, 01:32 PM
Maybe cephalo can help with a mapscript?

I'm thinking that a modified "maze" script would work. Most of the dungeon would be 1 or 2 tile "corridors" interspersed with larger rooms. Based on the work I've seen in the map scripting forum, it should be doable, I just have no clue how.

xienwolf
Mar 31, 2008, 01:49 PM
Actually I would propose that you use something that is a cross between Maze and Creation. Instead of forcing the computer to connect each of the Creation sections, you force it to keep them seperate. Then you make it place link "teleport" terrain features which work much like the Maelstrom (without the 25% chance of death).

This would allow you to have "Multiple floors" in your map for the player to cycle through. Either you can link the teleporters, or you can just leave them to go randomly, and introduce another (rarely placed) feature which simulates the effect of "Escape" and will send the player back to his base city tile.

Could be quite interesting, even with randomly generated terrain.


Alternatively, you could take a page from Dungeon Maker (PSP game from ~1 year ago) and allow the city to build "Teraforming" units, which you must send out into a map of nothing but mountains and actually create your own dungeon as you go. The idea here is that as you create new hallways, rooms and other aspects of the map using the Terraformers, you are expanding the "Unrevealed map" area for the computer to automatically generate Barbarian units and traps in. Plus you could have a few randomly placed scripts which cause for a specific reaction if a certain type of hallways/room is placed there, or you can write events for the game as a whole if there are certain conditions met with building your dungeon.

Lutefisk Mafia
Mar 31, 2008, 02:43 PM
Alternatively, you could take a page from Dungeon Maker (PSP game from ~1 year ago) and allow the city to build "Teraforming" units, which you must send out into a map of nothing but mountains and actually create your own dungeon as you go. The idea here is that as you create new hallways, rooms and other aspects of the map using the Terraformers, you are expanding the "Unrevealed map" area for the computer to automatically generate Barbarian units and traps in. Plus you could have a few randomly placed scripts which cause for a specific reaction if a certain type of hallways/room is placed there, or you can write events for the game as a whole if there are certain conditions met with building your dungeon.

This will not be a Dungeon Master type of game, but there will be the opportunity to change features a bit. I am investigating a "pickaxe" equipment item that will allow the unit holding it to dig through a few wall tiles before the pickaxe wears out. (Dwarves, of course, can dig through more tilles than other players.) I may also have a passwall spell for wizards.

In rare instances, it may be possible to create a wall, door or other feature.

And yes, I am trying to implement teleporters. I see them as a special form of trap, possibly a permutation of the glyphs I already have in place.

Demus
Mar 31, 2008, 06:31 PM
... the idea wasn't from "dungeon maker", it's from the great all-mighty Dungeon Keeper series, created back in the early 90s (if you haven't played them (1 and 2), pick them up somewhere! they're awesome).

sorry for getting off-topic though. Indeed, the teleporters should be a combination of door-like graphics and a trap-like mechanism (could be tough to get a clean copy across though)

woodelf
Mar 31, 2008, 06:33 PM
Just a quick note to other modders out there:

If you are designing a mod, one of the essential components is the artwork, since this is what the player sees the whole time. Modders like me can kludge our way through coding, but artwork is not my strong suit.

If you need something in 3d just ask and send me a pic. I jump around a lot with projects, but love to help here and there. :D

Lutefisk Mafia
Apr 01, 2008, 12:49 AM
If you need something in 3d just ask and send me a pic. I jump around a lot with projects, but love to help here and there. :D

Much appreciated! :) I am certain that I will take you up on this generous offer at some point!

Lutefisk Mafia
Apr 01, 2008, 12:57 AM
I really needed to take a break from coding for a while, so I decided to get artsy.

After downloading some royalty-free fantasy clipart, firing up GIMP, and acquainting myself with the Vista Windows Movie Maker, I made an intro movie for my mod. After downloading the RAD Video Tools, I "Binked" my WMV file into a BIK file, which now plays beautifully when starting a new game.

To give everyone a peek, I uploaded the video to YouTube. The link is here:

http://www.youtube.com/watch?v=VhFzrzvS5nk

I am using the Arcanum music "The Demise of the Zephyr" as the background music. Building upon that inspiration, I copied the style of the opening movie of Arcanum, which has a an old celluloid projection film quality to it.

I hope that you enjoy it!

Wyrmhero
Apr 01, 2008, 10:16 AM
Just wondering, will there be an option for multiplayer? I'd quite like to RP this with a few of my friends over the LAN, possibly all starting with an adventurer each, or so... Still, I can't wait!

Bartholomew
Apr 01, 2008, 10:29 AM
Great video! A rare multi-talented modder. Keep it up!

Psychic_Llamas
Apr 01, 2008, 10:31 AM
VERY VERY NICE MOVIE!
i cannot say anything else that sums up how cool it is :thumbsup: (well except that the old style movie works really well with it :D)

woodelf
Apr 01, 2008, 10:33 AM
I have to wait to get home to watch it. :(

zxcvbnm
Apr 01, 2008, 10:43 AM
It doesn't load it :(

Lutefisk Mafia
Apr 01, 2008, 10:54 AM
Just wondering, will there be an option for multiplayer? I'd quite like to RP this with a few of my friends over the LAN, possibly all starting with an adventurer each, or so... Still, I can't wait!

To be honest, I'm not sure. I was under the impression that, if two or more people have the exact same mod installed, they can play MP with it. I confess that I don't know much about MP, so I could be wrong. But if I am right about this, there is no reason why people couldn't play MP with Dungeon Adventure.

Lutefisk Mafia
Apr 01, 2008, 10:59 AM
It doesn't load it :(

Link works fine for me... You may have an issue with your local settings or drivers.

Try going to YouTube directly at their main page (www.youtube.com).

Then do a search for "dungeon adventure" -- my video should be about the fourth one listed. See if that video works for you. If it doesn't, then you definitely have an issue with certain youtube format videos.

zxcvbnm
Apr 01, 2008, 11:01 AM
No, it doesn't help. It just shows that circle of circles.

All other youtube videos have worked fine, though

Lutefisk Mafia
Apr 01, 2008, 12:59 PM
No, it doesn't help. It just shows that circle of circles.

All other youtube videos have worked fine, though

Sorry... I don't really know why that would be. Perhaps this info from YouTube help section will resolve it:

http://www.google.com/support/youtube/bin/answer.py?answer=58129&topic=10560

http://www.google.com/support/youtube/bin/answer.py?answer=56115&topic=10560

http://www.google.com/support/youtube/bin/answer.py?answer=74662&topic=10560

woodelf
Apr 01, 2008, 04:57 PM
Awesome video. :thumbsup:

BeefontheBone
Apr 01, 2008, 05:14 PM
I like it. Reminded me of Fallout :)

Perhaps a few too many ellipses (...) though. Given the speed at which the text advances, I'd say they weren't necessary except where you want to emphasise a pause - for instance, the last one for sure, and between say Law and Chaos, Good and Evil and so on, but not when it's just in the middle of a sentence which is spread over several pages.

Arctem
Apr 01, 2008, 08:01 PM
How are you handling healing? I think it would be best if you could only heal via poions or returning to your camp or using a potion. Or using a spell that depletes mana, or some other limited resource.

Also, I think it would be cool if new adventurers could somehow tag along with more experienced ones to gain experience, or maybe retire an older one to gain a new, low-level adventurer with promotions that you couldn't get any other way, with variations depending on what the old unit was (a mage gives a bonus to spellcasting, a warrior gives an extra point or two in strength, etc.).

Lutefisk Mafia
Apr 01, 2008, 08:42 PM
How are you handling healing? I think it would be best if you could only heal via poions or returning to your camp or using a potion. Or using a spell that depletes mana, or some other limited resource.


Bingo. Units will not heal simply by resting in place anywhere in the Dungeon. The only place where normal "rest-healing" can occur is at the campsite. Elsewhere, potions, spells, or other specials are required.

xienwolf
Apr 02, 2008, 02:29 AM
So is it to early to talk about having you use the Trophy System to make it so that "Passing" the dungeon with certain classes, or accomplishing certain great feats (killing a dragon with your bare hands :p) can unlock "Presitge" classes? I wanna be a Zombie and heal by eating my opponents. Fried Giant Rat is just SO good!

zxcvbnm
Apr 02, 2008, 10:09 AM
Will vampirism be in the game someday? You could heal from your dead humanoid enemies

Wyrmhero
Apr 02, 2008, 12:21 PM
I'd like an option availiable to MP, where you each control an Adventurer. It would be interesting to see if you co-operated or ran for the loot.

BeefontheBone
Apr 02, 2008, 03:37 PM
Intuitively that feels like a lot of work since the adventurers belong to the same civ. Having multiple civs with their own campsites should be pretty straightforward though. If you wanted to co-operate you could set the game up so you were allied, and have the map script group you together. Limiting the number of adventurers total would be somewhat more effort, unless units can be both a national and a world unit, and even then you'd need to scale the world limit based on the number of players, and you'd risk one player producing them quicker than the others. Hmm.

Incidentally, if that doesn't work out there's an .ini flag you can set which marks the mod as singleplayer only.

Nonobots
Apr 02, 2008, 07:24 PM
I don't want MP, I don't want zombies or vampirism* I Just Want To Play! And build maps for the mod, and play other people maps.

Seriously you're doing a great job here. The traps are rad the movie is great (may be a bit fast for the text) The graphics your using are all great and the art is very fitting.

I hope you don't make it too easy. I'm a Nethack player and won't mind starting a map 20 times over cause I just keep getting killed.

Which brings me to my question: what will you do with difficulty levels? I guess those will be important but just buffing the AI won't do I guess. You might want to keep a very slow heal rate for the easy diff levels (chieftain to prince). And maybe adjust the damage dealt by traps and monster attacks (prince and up) and have more monster spawned.

But I don't know much about modding so there might be an easier way to implement difficulty. Maybe just let people adjust their maps regarding difficulty.

* though I'd like all those things.

Lutefisk Mafia
Apr 02, 2008, 10:04 PM
Trophies, vampires, and MP will not be in the first release. I hope to get a simple version stable first. Then I can start adding extras. Great ideas, though!

Lutefisk Mafia
Apr 02, 2008, 10:09 PM
Spent the last day or so chasing down blind alleys.

I tried to do a rework of the "stone brick" terrain texture. Basically I wanted it to not blend and dither with surrounding terrain, but just show whole blocks. I got it to work, but it kind of looked like crap. Oh, well.

I also tried to implement a function that would make a new spell create a zone of culture on the map, without a city. It worked, but the culture zone disappears after the end of the player's turn. Tried a few work around in the CvEventManager python, and only succeeded in creating either bizarre effects or no effect at all. Oh, well.

As a last ditch effort, I will try blending the temporary spell I got working with some of the "autocast" code I create for traps. I'll keep you all posted if it works!

xienwolf
Apr 02, 2008, 10:36 PM
I'd say tone down healing and XP growth, while increasing NPC spawn rates should do nicely for Difficulty settings.

woodelf
Apr 03, 2008, 05:33 AM
Keep us posted and don't worry about graphical polish just yet. You'll get tons of help and feedback and :love: when we start playing. :p

Lutefisk Mafia
Apr 03, 2008, 09:35 AM
Keep us posted and don't worry about graphical polish just yet. You'll get tons of help and feedback and :love: when we start playing. :p

Incidentally, woodelf, do you know if anyone has made an animated rat unit yet? I have created a low level unit called "Vermin," and need to throw some rats into the mesh mix. Right now it is just a group of 5 tiny spiders -- which I admit looks nice and creepy when they scuttle around -- but I am really shooting for a mix of spiders and rats.

zxcvbnm
Apr 03, 2008, 09:49 AM
I got it to work now and all I can say is:

Great movie!

It might be a bit too fast though, even I felt it was going a bit fast, especially when compared to the FfH opening movie, but otherwise good work. Reminds me of one of my favourite games.

woodelf
Apr 03, 2008, 09:50 AM
Let me ask around. Might be easy to borrow a unit from the net and add an animation to it.

Psychic_Llamas
Apr 03, 2008, 10:15 AM
well were going to have a huge range of rats and rat-men for Warhammer, so i can try make one in max (ive made a couple of units im happy with), but i cant animate, so maybe could ask win or ploep to do so?

seZereth
Apr 03, 2008, 10:28 AM
well were going to have a huge range of rats and rat-men for Warhammer, so i can try make one in max (ive made a couple of units im happy with), but i cant animate, so maybe could ask win or ploep to do so?

why not using the wolf animation for it (rename the fidget animations, so it wont howl...). just rig a rat mesh to the wolf bones and here you go ;)... and before you ask: no, i have different stuff on my list :P

xienwolf
Apr 03, 2008, 10:42 AM
It might look a bit strange, but you could just stretch a bear out a little bit, Something like .5 Z-Axis, .75 x-Axis and 1.8 y-Axis should be tolerable.

EDIT: You might find this (http://forums.civfanatics.com/downloads.php?do=file&id=6059) handy for formations :)

woodelf
Apr 03, 2008, 10:48 AM
I agree that using a wolf anims would work perfect.

BeefontheBone
Apr 03, 2008, 12:17 PM
Spent the last day or so chasing down blind alleys.

I tried to do a rework of the "stone brick" terrain texture. Basically I wanted it to not blend and dither with surrounding terrain, but just show whole blocks. I got it to work, but it kind of looked like crap. Oh, well.

I also tried to implement a function that would make a new spell create a zone of culture on the map, without a city. It worked, but the culture zone disappears after the end of the player's turn. Tried a few work around in the CvEventManager python, and only succeeded in creating either bizarre effects or no effect at all. Oh, well.

As a last ditch effort, I will try blending the temporary spell I got working with some of the "autocast" code I create for traps. I'll keep you all posted if it works!
Depending on how often you wanted this effect to be used, either of the following might work (but will need per-turn checks; though with the scale of this mod those are likely to be a lot less of an issue than in a full-scale world map game).

* Have the spell or event create an immobile unit, which autocasts the culture spell each turn. Could then use the summons' limited duration to have the effect temporary, and even limit the number of summons (say to 1 per caster, as with skeletons in FfH).

* Similar, but adding an unpillageable feature with a PyPerTurn effect.

I'm guessing you're trying to achieve some kind of sanctuary effect, so that the benefits of being inside culture (healing, strength/withdrawl a la Homeland, animal units not being allowed to enter - 'turn'ing those undead - etc etc.) can be gained in the dungeon. If you're finding that the culture you create disappears at the end of the player's turn then most of that breaks (since the healing routine, including the eligibility check, takes place at the start of your turn I believe). The unit would therefore not work well. The feature, since it won't be owned by a player (I don't think) could trigger during enemy turns as well, but you'd still probably forfeit the healing unless you can get a PyPerTurn function to trigger at the very start of the turn.

Alternatively, could the spell create a temporary city? Call it 'Sanctuary', give it the settlement building and change it to block ALL buildings, reduce all commerce and maintenance to 0 etc etc, and add another building which causes it to be razed (without adding any war weariness, should that be an issue - assuming there isn't a -100% WW on the camp palace replacement already) the next turn. Might need several buildings to extend it to multiple turns though. That should fool the bit of code which presumably checks that tiles are within a city's cultural radius and prevents culture from counting if not.

Alternatively alternatively you'd need an SDK change to that routine I guess.

Lutefisk Mafia
Apr 03, 2008, 08:07 PM
The thing is..... Final Frontier has starbases which provide a permanent zone of culture outside of cities. Final frontier does not appear to have replacement or supplemental CvGameCoreDLL file. It is all XML and Python stuff, using the existing BTS hardcoding.

Or are there Final Frontier specific things hardcoded into the BTS DLL? That would be sort of backwards, but stranger things have happened.

So if Starbases work in Final Frontier, why can't I get a new unit to do the same thing in Dungeon Adventure? Or, for that matter, a specific terrain feature or improvement?

I looked at the thread about the mod that gives forts a zone of culture and ZOC, tried the suggestions, but it did not work in the FfH2 base that I am using. Heck I even tried my hand at changing the unzipped project files and recompiling a new DLL but that didn't work either.

The best I have been able to do is to get a specific unit type or feature type to automatically refresh a zone of culture at the start of the player's turn. It is clear that it disappears for several key calculations, however. Even though they LOOK like they never go away, tiles with this type of culture zone do not provide healing benefits, etc.

This is even more puzzly than figuring out trap units. But I did get that to work eventually, so I will just keep picking away at this one, too.

Lutefisk Mafia
Apr 03, 2008, 08:12 PM
I'd say tone down healing and XP growth, while increasing NPC spawn rates should do nicely for Difficulty settings.

Yes, healing rate is at zero for enemy and neutral territory. Reduced for friendly territory, and best only at the campsite itself. Part of my reason for struggling with a short duration or permanent zone of culture detaached from cities is to make possible a spell or feature that provides healing rate and no animal incursions, etc.

Plus, I was hoping to make "controlling" the corridors and rooms a key feature of the game. Might have to rethink that one!

Oh, and no units get XP automatically. You have to actually do stuff to get XP.

xienwolf
Apr 03, 2008, 08:24 PM
Well, I meant having it so that at low difficulty you can heal almost completely in 1 or 2 turns at base camp, but at top difficulty you can't heal by just sitting at basecamp, you have to actually use a potion or spell in order to heal (or sit there for dozens of turns, letting the NPCs beef up).

And for XP gain I meant that on low difficulty, you can get your first level after killing 2 or 3 rats, but at top difficulty you will have to beat down 10 rats and a couple wolves for that first level.

Meanwhile, at low levels you have almost a static dungeon, you can clear entire sections of it and then run back and forth pretty freely through them, encountering 1 or 2 isolated monsters at worst. But on top difficulty, you can clear a corridor, turn the corner to start on the next, then run away in blind panic and find 5 monsters waiting for you in the corridor you JUST cleared ;) And possibly allow the NPC units to gain some XP automatically on higher difficulty levels so that they can get promotions if you are not moving fast enough :)

mtagge
Apr 04, 2008, 03:23 AM
whoops re-read your post about only getting the culture to refresh at the start of the turn.

Move along, nothing to see here.

Grey Fox
Apr 04, 2008, 01:47 PM
Or are there Final Frontier specific things hardcoded into the BTS DLL? That would be sort of backwards, but stranger things have happened.

Not hard coded, everything is added to xml etc.

But Final Frontier has a python file called CvAI which has code on AI Behaviour, and Starbases got code in there.

mtagge
Apr 04, 2008, 01:54 PM
The best I have been able to do is to get a specific unit type or feature type to automatically refresh a zone of culture at the start of the player's turn. It is clear that it disappears for several key calculations, however. Even though they LOOK like they never go away, tiles with this type of culture zone do not provide healing benefits, etc.

This is even more puzzly than figuring out trap units. But I did get that to work eventually, so I will just keep picking away at this one, too.

Random thought, but following with the culture refreshing at the start of the turn, but after the heal and other calculations trigger. Why don't you continue to use the culture which refreshes at the start of every turn, but also create a subfunction that gives a promotion with a bonus to heal in every terrain type that is applied when the unit is in culture, but removed when they leave the cultural boundries. You can either have the promo apply and remove at the start of the turn, or on unit move depending on what you prefer. Having the benefits of culture from promotions is then only a cosmetic issue, and it becomes easier to tie in additional benefits from being on the campsite by just adding one more if statement.

Alternatively if you want to decouple it from culture altogether, you can have the promo applied and removed at the start of each player turn by checking all squares nearby a campsite with a (X,Y) (-1, +2) loop. Different promos for cities, campsites, and certain henchmen.

Psychic_Llamas
Apr 04, 2008, 06:59 PM
just a thought, what tile improvements will you have? henchmen building mines and farms is a BIT daft in a dungeon :p

woodelf
Apr 05, 2008, 08:39 AM
just a thought, what tile improvements will you have? henchmen building mines and farms is a BIT daft in a dungeon :p

Is there a need for improvements? Maybe serfs? You need to get gold to pay for castle upkeep. Actually I remember playing Might and Magic 4/5 where the goal was to find coins so you could expand/fix your castle. Maybe cash can buy improvements/buildings?

Lutefisk Mafia
Apr 05, 2008, 11:37 AM
I finished my vermin unit today. Screenie below:

http://img143.imageshack.us/img143/8807/vermincr3.jpg

Yes, the rats look like stretched out, shrunken, re-skinned bears because that's what they are. Good enough for now.

Lutefisk Mafia
Apr 05, 2008, 11:45 AM
Well, there will be mines, actually, but they won't look like the mines in regular Civ. It will be an indication that the adventurers are harvesting veins of gold or gems that exist in the dungeon. The idea is that if the player finds a vein of gold, he or she can set a henchman to mining it and building the "mine" improvement near the wall that has the vein. Once the improvement is in place, it will periodically spit out a gold bonus onto the tile where the mine is. These bonuses can be picked up by player units and brought back o the campsite. Once at the campsite, they can be dropped in the fat cross to provide a permanent bonus to the production of the campsite, or can be converted directly into a sum of cash.

Of course these improvements can be destroyed by the barbs, so the player needs to protect them somehow -- which is where cannon fodder henchman units come in. Also, bonuses in the campsite fat cross can be "stolen," so the player needs to keep an eye on them, too.

Lutefisk Mafia
Apr 05, 2008, 08:22 PM
Every dungeon game needs rats to kill at beginning levels. And so, I rethought the "vermin" unit. Vermin are now a bunch of 5 tiny spiders. For rats, I ditched the silly shrunken bears and reskinned a panther instead. I think it looks a little more ratlike, but would welcome feedback. Also, do people like the mixed unit type for vermin (spiders and rats) or should it just be spiders? Very easy thing to change.

Screenie of new rats:

http://img129.imageshack.us/img129/2949/ratsdp8.jpg

Grey Fox
Apr 05, 2008, 08:36 PM
Maybe reduce their height and make them a bit wider to make thir legs shorter and their body fatter.

Psychic_Llamas
Apr 06, 2008, 01:39 AM
would you like me to try make a custom rat modle? someone else will need to fit animations though. the panthers are ok for placeholders, much better tha nthe bears though

and the mine thing sounds interesting, not sure i completely understand it, but ill wait and see :) what about farms? will there be some kind of 'veggie garden' imprement or something? what about a mushroom resource for food? corn wont grow in a ancient castle cellar, but mushrooms would be abundant. check my sig, ive got a mushroom modle in there :p

EDIT: dosnt matter, im making one anyway :p we need one for Warhammer so i figured ill make it now :p

woodelf
Apr 06, 2008, 07:55 AM
I mentioned rats to winddelay and he has some basic models from the net. When he sends them my way I'll send them this way. :hmm:

Also, custom anims aren't necessary, unless you really want to practice on rats.

Lutefisk Mafia
Apr 06, 2008, 08:43 AM
Thank you, woodelf, that would be great. Traditionally, rats are an important part of any dungeon crawl or RPG.

If I can get a decent model, the panther animations should work fine. I really need to remember to change the fidget sounds, though. Right now my rats are roaring. I should probably change that to squeaking or just silence.

I'll save the roaring for the unique world unit, the ROUS. :)

@Psychic Llamas: Any models for things that grow in dungeons would be very welcome. I do plan to have "garden boxes" near camp sites in which the player can grow mushrooms or whatever.

Generally, the grabbable resources present the player with a choice: Convert it now into a one time benefit, or place it near the campsite to exploit for a smaller benefit over time. For example, gold would be something like: convert into 50 coins immediately, or put it near the campsite and get and extra coin every turn.

woodelf
Apr 06, 2008, 08:49 AM
Just in case you I hadn't mentioned it in a day or two...I'M DYING TO PLAY THIS MOD!!!!!! :drool:

Arctem
Apr 06, 2008, 10:28 AM
For the various vermin, why not have a vermin horde unit of mixed rats and spiders, which periodically spawns a weaker vermin unit that is either a single rat or a single spider. The vermin horde unit would slowly take over an area with vermin, creating a nice infestation . And if you can't find the horde, you're stuck with continuously cleaning out the vermin units, which wouldn't be worth any XP after a certain level so it couldn't be exploited for easy leveling.

Psychic_Llamas
Apr 06, 2008, 11:42 AM
well i just finished the modle for my rat, just need to skin it. i wish you had said win had done a rat before, save me the time :p but it was fun. his is probably much better than mine anyway, mines too many polys for a small beasty.

ill post a pic when its done.

Lutefisk Mafia
Apr 06, 2008, 08:59 PM
Thank you to Psychic_Llamas for the neat mushroom model.

I now have them in-game as a food bonus. Screenie below:

http://img523.imageshack.us/img523/7521/mushroomsqa7.jpg

Arctem
Apr 06, 2008, 09:14 PM
Nice. Will the mushrooms have a random chance to poison the adventurer?

Lutefisk Mafia
Apr 06, 2008, 09:55 PM
Nice. Will the mushrooms have a random chance to poison the adventurer?

As with many of the bonuses, you can do various things with them. Food bonuses can be dropped near the campsite for a permanent boost to food production on that tile (usually +2 food, enough to attract and keep another henchaman). A player may also have the carrying unit consume the food resource, instead. Usually, this will act like a heal potion, healing all damage to the unit, but will destroy the bonus. For certain food types, there will be a small chance of other effects happening. For mushrooms, I was planning a small chance of poisoning, and a small chance of having the "confusion" effect applied.

Confusion -- if I can figure out how to code it -- makes the player essentially loose control of the unit for a while. In Rogue, the unit would just end up moving in a random direction each turn. Not sure how to implement this. I need to figure it out, though, because I was planning on a "confusion" mage spell, too.

Anyway -- Mushrooms can now be grabbed and dropped. As mentioned some time ago, for the next few days I will likely focus on getting the other resources so they can be grabbed and dropped, too. I will be busy the next few evenings (tax filing deadline is coming up and I suppose I should do that, huh?) and won't have the time to work on anything complex.

Rex rgis of Ter
Apr 06, 2008, 10:34 PM
About halfway down this page you'll find an excellent treasure chest you could use.

http://forums.civfanatics.com/showthread.php?t=198849

Also, the rats/mushrooms look awesome. Can't wait to see the mod in action!

Lutefisk Mafia
Apr 06, 2008, 10:52 PM
About halfway down this page you'll find an excellent treasure chest you could use.

http://forums.civfanatics.com/showthread.php?t=198849

Also, the rats/mushrooms look awesome. Can't wait to see the mod in action!

Not seeing what you indicating -- is it just a part of the entire mod?

Also, is it different from the chest that was already posted earlier in this thread?

xienwolf
Apr 06, 2008, 11:35 PM
Post 7, 4th screenshot shows a treasurechest on an island. I think the one you have is better, but this one is opened, so maybe if you reskin it well enough you could use both (one to indicate that the treasure has already been cleared of traps and is now ready to loot)

Psychic_Llamas
Apr 07, 2008, 04:16 AM
well ive finished my rat. the link is in my sig. :) its not animated and all that, so i hope you know how to :p

Ekolite
Apr 07, 2008, 04:57 AM
Just a random little idea, but are you planning to do anything with specialists? You said you could produce ''henchmen units'', you could maybe have a specialist trainer that allows these units to start with some expirence, or a specialist blacksmith who could give them a bonus promo etc.

Will technology be implememented at all?

Psychic_Llamas
Apr 07, 2008, 06:32 AM
Just a random little idea, but are you planning to do anything with specialists? You said you could produce ''henchmen units'', you could maybe have a specialist trainer that allows these units to start with some expirence, or a specialist blacksmith who could give them a bonus promo etc.

thats a pretty cool idea

and on the note of technology, i just had a brainwave, what if the technologys are different branches of specialization for your heros? for example there could be a mage branch, warrior branch, rogue branch, bard branch, cleric branch etc. and each tech in that branch would affect the specific heroes of that class, ie +1 attack strenght to warrior class heroes with the 'brawling' tech etc

zxcvbnm
Apr 07, 2008, 06:38 AM
good ideas both.


One question: WHEN? :drool:

Nonobots
Apr 07, 2008, 09:55 AM
I sure hope Lutefisk_Mafia can support the pressure... nothing to play yet and he already has a rabid fan base.

Lutefisk Mafia
Apr 07, 2008, 10:04 AM
well ive finished my rat. the link is in my sig. :) its not animated and all that, so i hope you know how to :p

Looks great - I will download it when I am on my other computer and see what I can do with it. Thanks!

Lutefisk Mafia
Apr 07, 2008, 10:11 AM
@ Kol. 7 and Pschic_llamas:

For specialists, they will be available with certain techs, and will give standard production, tech, etc. boosts.

I hope to have Great People available (rarely) who will offer the possibility of super-specialists. Keep in mind that this is intended to be a 30 minute game, so the detail won't be too deep.

About tech: I had planned research paths for fighters, mages, and rogues. Other character classes are going to need to wait for future versions. The tech tree will also have techs like "subterranean exploration" or "spelunking" and others like "dungeon ecology." These techs will allow things like better movement, better exploitation of dungeon resources, and creation of new economic and worker-type units.

zxcvbnm
Apr 07, 2008, 11:52 AM
:goodjob:

Arrrrrrrrrgggggggghhhhhhhh, I can't wait to get my hands on this... luckily we have Forum Games and NESes...

Lutefisk Mafia
Apr 07, 2008, 06:59 PM
Okay... I have noticed the enthusiasm for this mod mod and just wanted everyone to know that I really appreciate the support. I am excited about it, too.

There is still a lot to be done before this is releaseable, though. I am wary of releasing a slapped together pre-alpha that will give people a bad experience. At the same time, I wish I could give everyone something with which to whet their appetites instead of just incessantly teasing you with screenies.

Here's where the mod mod is at so far:

1. Some new units together with their abilities. The traps and glyphs are the most developed, but by no means polished.

2. Some new equipment, like boarding hooks, lanterns, and potions. This area need a lot of "fill-in," though.

3. The terrain art is pretty well set. You can make nice looking dungeons, but I haven't even changed the names of the terrain, so... yet again, a lot to be done.

4. New features like doors and altars are in, but not yet fully implemented.

5. The change over for civics has been started, but has a long way to go. The first two civics are in, but don't do anything yet.

6. Nothing has been done to techs yet.

7. And eventually, all of the non-used extra cruft will need to be stripped away -- if for no other reason than to make the distributable file smaller.

Finally, I need to figure out how to repack the ART files into a PAK and get it to work, and how I am going to distribute this monster file.

So I hope that everyone can understand that a release is still a ways off. I will continue to post updates. I may (may!) also consider doing a limited release to beta-testers to help me iron out bugs and polish certain features. Rest assured that, if that happens, the people who have posted in this thread and offered help and suggestions will be at the front of the line!

Thanks again for your support and patience!

Arctem
Apr 07, 2008, 08:10 PM
What will your camp build? If it builds units it will lower the importance of protecting your adventurers, and I can't think of anything else that they could build without it either being broken in some way or result in you building the same thing over and over.

Lutefisk Mafia
Apr 07, 2008, 09:16 PM
What will your camp build? If it builds units it will lower the importance of protecting your adventurers, and I can't think of anything else that they could build without it either being broken in some way or result in you building the same thing over and over.

First, the builds will take a long time. they will have high cost and, keep in mind, the campsite has pretty low production.

Second, the builds will be for "helper" units. Some will be one-shot units that let you build a garden box, holding pen for animals, or other "fat cross" improvement.

Others will be gopher type units: either cannon fodder to find traps (by activating them!) or runners to fetch items to and from camp. Still others may provide a simple buffing effect for the adventurer they accompany (like a better heal rate). These buildable units will never be very useful as combat units, so it is crucial to protect and develop the adventurers.

Psychic_Llamas
Apr 07, 2008, 09:56 PM
dont stress about a release date, im just happy to watch the progress :thumbsup:, (although it WOULD be nice to get my hands on the terrain to start making maps! i love making maps!)

Arctem
Apr 07, 2008, 09:59 PM
Sounds good, will some of the little units have a chance to become adventurers, rather through events or defeating a huge enemy like Acheron?

edit: I would also enjoy trying the mapmaker.

Lutefisk Mafia
Apr 08, 2008, 09:19 AM
Sounds good, will some of the little units have a chance to become adventurers, rather through events or defeating a huge enemy like Acheron?

edit: I would also enjoy trying the mapmaker.

Probably not in the first release. The helper units will be so underpowered that it is very unlikely that they would ever defeat a legendary unit like Archeron. An event may be implemented later.

Right now, it will be possible to get more adventurers added to the party by increasing the Great People counter. The main campfire generates a tiny amount of "adventurer" GPPs and it will be possible to build structures that generate more.

Lutefisk Mafia
Apr 08, 2008, 09:24 AM
I was looking for something easy to do last night, so I converted some of the aquatic resources into "dungeon" versions. Essentially, I figured that crabs, fish, and whales would become albino cave versions if they lived in The Dungeon for many generations.

I few minutes with GIMP and the colorize tool (saturation set to zero, lightness at about 85) and we now have pallid versions of these resources. I can't post pictures right now (I'm at the wrong computer) but just imagine white versions of these resources with subtle markings.

Incidentally, before anyone jumps all over it, I should hasten to add that the whales in The Dungeon are actually Albino Pygmie Whales. A very rare, and very sought-after, delicacy. And totally capable of existing in The Dungeon. ;)

Demus
Apr 08, 2008, 09:44 AM
where will they live? will there be dungeons with rivers or lakes? or have those creatures evolved to live on land?

woodelf
Apr 08, 2008, 09:45 AM
sewers? :evil:

Fetid pools of yuk?

Lutefisk Mafia
Apr 08, 2008, 01:13 PM
The Dungeon will have the occasional pool and underground lake.

kenken244
Apr 08, 2008, 04:24 PM
With all the possible mechanics that could be used for this type of mod, would it be possible, after the release of course, to have people submit some pieces of code for things they might want to use in some of their maps to be integrated into the main download? it would allow people to make very diverse dungeons while reducing the work you have to do.

Lutefisk Mafia
Apr 08, 2008, 10:43 PM
With all the possible mechanics that could be used for this type of mod, would it be possible, after the release of course, to have people submit some pieces of code for things they might want to use in some of their maps to be integrated into the main download? it would allow people to make very diverse dungeons while reducing the work you have to do.

Absolutely! In fact, I am looking forward to the point when the mod mod is mature enough that people can start thinking about mod mod mods. :)

In addition to the code bits, I especially envision people making dungeon maps using the modded WorldBuilder and trading them around. For example one dungeon could be undead themed, while another would focus on bands of Orcs, ruled by a Dragon. The possibilites are endless.

Lutefisk Mafia
Apr 08, 2008, 10:51 PM
My cave dwelling, albino aquatic resources are below:

http://img81.imageshack.us/img81/8180/fishtg8.jpg

Psychic_Llamas
Apr 09, 2008, 12:31 AM
will there also be a sewer map setting? with green polluted water and skungie metal pipes to roam around? every good DnD game needs a sewer adventure :p

woodelf
Apr 09, 2008, 07:34 AM
Indeed. Sewer maps and adventures scare me to death.

Arctem
Apr 09, 2008, 03:29 PM
In addition to the code bits, I especially envision people making dungeon maps using the modded WorldBuilder and trading them around. For example one dungeon could be undead themed, while another would focus on bands of Orcs, ruled by a Dragon. The possibilites are endless.

So will you be able to control what spawns where? It would kind of ruin an undead map if you suddenly have random giant spiders spawning all over the place.

xienwolf
Apr 09, 2008, 04:02 PM
Probably be easiest to link them to specific types of terrain. Then you have Undead who spawn in "Fetid Corridors" and spiders who spawn in "Cobwebbed Corners"

Though that could lead to a TON of terrain types....

kenken244
Apr 09, 2008, 04:05 PM
So? you could make them be invisible in the pedia so no-one would care.

Arctem
Apr 09, 2008, 07:02 PM
So? you could make them be invisible in the pedia so no-one would care.

It would still be annoying while making maps, having to sort through all the possible terrains to find the one you want. What might work is to have a "spawn creature" that is invisible and moves around randomly with no attack and defence, and you give it promotions based on what creatures you want, which it then spawns randomly, but only if an adventurer can't see it, if possible. I know the randomly spawning based on promotions is possible, vanilla FFH2 has it, but I don't know about the not being able to see it part. (meaning spawning when out of sight)

Lutefisk Mafia
Apr 09, 2008, 10:07 PM
It would still be annoying while making maps, having to sort through all the possible terrains to find the one you want. What might work is to have a "spawn creature" that is invisible and moves around randomly with no attack and defence, and you give it promotions based on what creatures you want, which it then spawns randomly, but only if an adventurer can't see it, if possible. I know the randomly spawning based on promotions is possible, vanilla FFH2 has it, but I don't know about the not being able to see it part. (meaning spawning when out of sight)

I suppose you could use a PyPerTurn function for the Promotions. Within the Python coding, it would be easy to create a conditional check to look for player units nearby (say, within 2 or 3 tiles). If the check was negative, then the Python would look at a nested logic loop that had a % chance of spawning a unit.

zxcvbnm
Apr 10, 2008, 05:57 AM
My cave dwelling, albino aquatic resources are below:

http://img81.imageshack.us/img81/8180/fishtg8.jpg
The water should be a dungeon-suitable colour. Black or dark green or something, not sky-blue as on the surface.

Arctem
Apr 10, 2008, 03:28 PM
I suppose you could use a PyPerTurn function for the Promotions. Within the Python coding, it would be easy to create a conditional check to look for player units nearby (say, within 2 or 3 tiles). If the check was negative, then the Python would look at a nested logic loop that had a % chance of spawning a unit.

The reason I thought of this would be that it would make it so that there was no spawn-camping, since you wouldn't know where they spawned, and you could control what spawned. Also, you could add promotions like Spawn I, Spawn II, etc. to control the frequency of spawns, while what spawns would be determined by other promotions. Similarly to how the spell system works, with both channeling and mana promotions required to cast (I think).

Also, will you be able to find mana to learn new spells (like you find a small source of fire mana, which lets you teach one unit Fireball before it is used up, then you have to find another).

Lutefisk Mafia
Apr 10, 2008, 05:03 PM
The reason I thought of this would be that it would make it so that there was no spawn-camping, since you wouldn't know where they spawned, and you could control what spawned. Also, you could add promotions like Spawn I, Spawn II, etc. to control the frequency of spawns, while what spawns would be determined by other promotions. Similarly to how the spell system works, with both channeling and mana promotions required to cast (I think).

Also, will you be able to find mana to learn new spells (like you find a small source of fire mana, which lets you teach one unit Fireball before it is used up, then you have to find another).

These spawn units would likely be a variation on the trap code I already developed. The main difference is that I'd make them invisible instead of just hidden -- and make sure that they were not "discoverable." I'd have to think about what AI to assign them, though. You'd want them to wander around, but not attack players. Explore AI, maybe?

For mana, I hope to treat it like the other resources. You have a small benefit from holding it (maybe the ability to cast certain spells), a long term benefit from dropping it in the camp fat cross radius (maybe the ability to give spellcasters certain promotions), and a one time big benfit from converting it in your camp (maybe summonables). This concept is still pretty fluid. I haven't even started working on the magic system yet.

Grey Fox
Apr 10, 2008, 05:15 PM
If you want to make them unable to attack, just set that tag to 1. ;)

xienwolf
Apr 10, 2008, 05:31 PM
Actually I would go ahead and make them their own Civilization, but they just happen to spawn units which are Barbarian. That way you can set them to be at peace with everyone and unable to declare war (or be seen for any kind of diplomacy), and they can walk right through the player. It would also allow you to establish a spell, item or ritual which initiates a "Closed Borders" with the spawning mobs to force them to stay out of your territory (or if you want territory to be safe no matter what you can just set it that way to start with)

Lutefisk Mafia
Apr 10, 2008, 08:45 PM
The water should be a dungeon-suitable colour. Black or dark green or something, not sky-blue as on the surface.

Tried to change this today. Mostly got a bunch of crashes to desktop. The only thing that seemed to take was changing the color of the coast and ocean textures but, no matter what I did, the water still looked pretty blue.

xienwolf
Apr 10, 2008, 09:21 PM
Well, here is some slimy ocean (http://forums.civfanatics.com/showthread.php?t=198140), at least you can see how they changed it to make what you want if it doesn't work well enough.

Lutefisk Mafia
Apr 11, 2008, 12:10 AM
@xienwolf: I will try the slimy ocean. Thanks for the tip! The computer I am using right now does not have WinRAR, but I'll download the file on a different computer and see what it is all about.

Progress Update:

I fiddled around with doors some more today. I wanted them to make noise when opening and closing. For some reason, CvEventManager refuses to play noises on the pPlot used in the onUnitMove function. I simply could not coerce the Python to play the sound I wanted when a unit moved onto a closed door (which is a terrain feature). Oddly enough, I had no problem getting it to work for the pOldPlot (plot that the unit is moving off of).

I ended up using a goofy work-around. I created an invisible unit called "UNIT_NOISE." All closed doors get one of these units placed on them to begin with. The only function of this unit is to sit there and wait for a unit to move onto its tile. Once that happens, the Noise unit casts a spell that does nothing but play a certain sound and sacrifice the Noise unit. When the player (or AI) unit moves off of the now open door -- as long as there are no other units remaining in the doorway -- the door gets changed to a closed door, the "door closing" sound gets played, and a new Noise unit is created on the door tile.

What a kludgy mess. But it works. Now the doors open and shut in a believable way, complete with door sounds. This improves the functionality of doors beyond what was done in the Aftermath mod.

woodelf
Apr 11, 2008, 06:16 AM
Kludgy work arounds don't bother me too much since these are going to be short games.

zxcvbnm
Apr 11, 2008, 06:22 AM
Tried to change this today. Mostly got a bunch of crashes to desktop. The only thing that seemed to take was changing the color of the coast and ocean textures but, no matter what I did, the water still looked pretty blue.
Strangely FfH has the same problem. The water stays light blue although in WB new lakes become the darker shade they are supposed to be.

And those slimy oceans are perfect for caverns!

Psychic_Llamas
Apr 11, 2008, 08:49 AM
Progress Update:

I fiddled around with doors some more today. I wanted them to make noise when opening and closing. For some reason, CvEventManager refuses to play noises on the pPlot used in the onUnitMove function. I simply could not coerce the Python to play the sound I wanted when a unit moved onto a closed door (which is a terrain feature). Oddly enough, I had no problem getting it to work for the pOldPlot (plot that the unit is moving off of).

I ended up using a goofy work-around. I created an invisible unit called "UNIT_NOISE." All closed doors get one of these units placed on them to begin with. The only function of this unit is to sit there and wait for a unit to move onto its tile. Once that happens, the Noise unit casts a spell that does nothing but play a certain sound and sacrifice the Noise unit. When the player (or AI) unit moves off of the now open door -- as long as there are no other units remaining in the doorway -- the door gets changed to a closed door, the "door closing" sound gets played, and a new Noise unit is created on the door tile.

What a kludgy mess. But it works. Now the doors open and shut in a believable way, complete with door sounds. This improves the functionality of doors beyond what was done in the Aftermath mod.

rename them to poultergeists. they sound like tricksy little spirits playing pranks on adventureres :p

xienwolf
Apr 11, 2008, 10:24 AM
I know that for Forests there is a 15% chance of getting the Birds to fly out of them and make a sound. You should be able to create a similar effect for your doors and set it to 100% chance, no? But of course that would then happen even when you moved onto a door you already opened... unless they close again when you move off of them that is :)

EDIT: And now that I re-read your post, they DO close again... so this should be the perfect solution.

Lutefisk Mafia
Apr 11, 2008, 12:54 PM
I know that for Forests there is a 15% chance of getting the Birds to fly out of them and make a sound. You should be able to create a similar effect for your doors and set it to 100% chance, no? But of course that would then happen even when you moved onto a door you already opened... unless they close again when you move off of them that is :)

EDIT: And now that I re-read your post, they DO close again... so this should be the perfect solution.

Using the terrain effect would be easier, but I can't find where sounds are associated with the visual effect. CvEffectInfos lists the EFFECT_BIRDSCATTER that is referenced in the CvFeatureInfos file. But the CvEffectInfos just references a NIF, not a sound file. The SND_BIRDS_SCATTER can be found in AudioDefines and linked to AS3D_UN_BIRDS_SCATTER in the Audio3DScripts file.

So how do the effects get their associated sounds?

Psychic_Llamas
Apr 11, 2008, 06:57 PM
in CIV4FeatureInfos the lines:

<EffectType>EFFECT_BIRDSCATTER</EffectType>
<iEffectProbability>15</iEffectProbability

xienwolf
Apr 11, 2008, 07:12 PM
Yes, but that only calls the effect, which so far we can only see as being visual. The problem is finding where it actually calls the Sound file from.

Every location that "Birds" shows up in the Python or XML:

In Audio3DScripts.xml
<Script3DSound>
<ScriptID>AS3D_UN_BIRDS_SCATTER</ScriptID>
<SoundID>SND_BIRDS_SCATTER</SoundID>
<SoundType>GAME_SFX</SoundType>
<iMinVolume>55</iMinVolume>
<iMaxVolume>80</iMaxVolume>
<iPitchChangeDown>-3000</iPitchChangeDown>
<iPitchChangeUp>0</iPitchChangeUp>
<bLooping>0</bLooping>
<iMinTimeDelay>0</iMinTimeDelay>
<iMaxTimeDelay>0</iMaxTimeDelay>
<StartPosition>NONE</StartPosition>
<EndPosition>NONE</EndPosition>
<iMinVelocity>0</iMinVelocity>
<iMaxVelocity>0</iMaxVelocity>
<iMinDistanceFromListener>0</iMinDistanceFromListener>
<iMaxDistanceFromListener>0</iMaxDistanceFromListener>
<iMinDistanceForMaxVolume>500</iMinDistanceForMaxVolume>
<iMaxDistanceForMaxVolume>1000</iMaxDistanceForMaxVolume>
<iMinCutoffDistance>7000</iMinCutoffDistance>
<iMaxCutoffDistance>7000</iMaxCutoffDistance>
<bTaperForSoundtracks>0</bTaperForSoundtracks>
<iLengthOfSound>0</iLengthOfSound>
<fMinDryLevel>1.0</fMinDryLevel>
<fMaxDryLevel>1.0</fMaxDryLevel>
<fMinWetLevel>0.5</fMinWetLevel>
<fMaxWetLevel>0.5</fMaxWetLevel>
<iNotPlayPercent>0</iNotPlayPercent>
</Script3DSound>


In AudioDefines.xml
<SoundData>
<SoundID>SND_BIRDS_SCATTER</SoundID>
<Filename>Sounds/BirdsScatter</Filename>
<LoadType>DYNAMIC_RES</LoadType>
<bIsCompressed>1</bIsCompressed>
<bInGeneric>1</bInGeneric>
</SoundData>


In CIV4EffectInfos.xml
<EffectInfo>
<Type>EFFECT_BIRDSCATTER</Type>
<Description>Birds flying out and fading.</Description>
<fScale>0.4</fScale>
<fUpdateRate>1.0</fUpdateRate>
<Path>Art/Effects/Magpie/Flock.nif</Path>
<bIsProjectile>0</bIsProjectile>
</EffectInfo>


And then where you cited from CIV4FeatureInfos.xml

There is nothing in the Python at all that contains the word "Birds", and nothing seems to actually link the sound to the Effect thus far.

EDIT: Just checked the Uncompiled DLL from before this patch. Line 3311 of CvUnit.cpp:
if (getOwnerINLINE() == GC.getGameINLINE().getActivePlayer())
{
if (!(pPlot->isOwned()))
{
//spawn birds if trees present - JW
if (featureType != NO_FEATURE)
{
if (GC.getASyncRand().get(100) < GC.getFeatureInfo(featureType).getEffectProbabilit y())
{
EffectTypes eEffect = (EffectTypes)GC.getInfoTypeForString(GC.getFeature Info(featureType).getEffectType());
gDLL->getEngineIFace()->TriggerEffect(eEffect, pPlot->getPoint(), (float)(GC.getASyncRand().get(360)));
gDLL->getInterfaceIFace()->playGeneralSound("AS3D_UN_BIRDS_SCATTER", pPlot->getPoint());
}
}
}
}


Looks like this might be our winner. It states that if the plot is NOT owned & DOES have a feature, to then check the probability for the effect (whatever it might be), play that effect if the probability hits, and then I think it sends a Sync message for Multiplayer? Don't know on that line... and then it plays the Birds Scatter sound effect (no matter what your effect actually was...)

Lutefisk Mafia
Apr 11, 2008, 10:11 PM
Well.... I don't plan to mess around with the DLL. My previous attempts at fiddling with DLLs and recompiling them were not pretty.

One option would be to simply change the birdscatter sound file to the "door opening" sound. I plan to get rid of forests anyway, so the birdscatter effect could be repurposed to doors. I'd have to shrink the bird NIF down to invisible, too.

The other option would be to just use the noise trigger units. I already have them implemented, and to be honest I am liking this option. They can be used for other atmospheric sounds, too, just by giving them different promotions -- sort of the same system I used for traps and glyphs. Think about it... the player walks along a corridor and suddenly hears an evil chuckle... or a series of clicks. Or any other sound you care to have triggered.

Since I've got it working the way I want -- both door opening and door closing sounds that behave realistically -- I think I'll just leave it. Besides, I may be able to repupose the bird scatter effect to make them look like bats. THAT, would be cool. :)

Lutefisk Mafia
Apr 11, 2008, 10:24 PM
In other news, I had some success with my spawner units.

I now have invisible barb units that boogie around The Dungeon seeding it with a specific type of barb unit. Again, utilizing the same sort of promotions scheme that my traps and glyphs use, the spawner will spawn a particular type of unit depending on what promotions it has.

The spawner units have a special promotion that calls a PyPerTurn effect. the effect looks around the unit a certain distance. If there are no enemy units within the radius, there is a chance to spawn a regular unit. The spawners can move through impassable terrain, and have a move of four. The AI is set to EXPLORE. This keeps them running around The Dungeon, seeding the occasional unit. I am still fiddling with the best combination to keep them from using doors -- it looks sort of silly when a door opens by itself for no apparent reason.

It will take a good deal of play testing to get the balance right on these units. I want them to add a steady stream of wandering monsters, but not overpower the player with solid waves of enemy units. I may change the code so that the spawner will only have a chance to spawn if there are NO other units of any kind within the set radius. So, in essence, if another barb unit was too close, there would be no spawn. Otherwise, it is possible that the spawner would get stuck in an isolated area and spawn up a solid mass of units.

In any case, this is good fun. The Dungeon is starting to look more lived in!

xienwolf
Apr 11, 2008, 10:25 PM
Does it give you a log entry for the unit's death with the invisible units method? I assume not.


The sound file should trigger for any tile that uses an effect, and you can customize your effect to use any NIF that you want, so you don't have to remake the Bird Scatter at all to still use it. And as long as you only use 1 sound you can just use the already implemented Bird Scatter and just replace it with whatever sound you want.


I think you could get a simple scampering sound and have someone whip up a NIF for you which is spiders scuttling across the floor, and another which is rats scurrying down the corridor. Either of those would be pretty nifty too :)

EDIT: To get your spawners to quit opening doors, just tell your Door Sound dudes not to cast their spell if it is a Spawner on the tile. You tied both the opening/closing and the sound to them, didn't you?

Lutefisk Mafia
Apr 12, 2008, 06:03 PM
I got the spawner to stop opening doors by removing their flat movement cost, and upping the movement cost of doors. I had been meaning to make a doors a "forced stop" anyway.

In the rare event that a spawner still triggers a door, well... I can live with that. It is sort of spooky and freaks out the player a little.

Oh, and the door noise units just handle the "door opening" sound. The door closing effect and sound is handled by an onUnitMove lookback to pOldPlot.

Lutefisk Mafia
Apr 12, 2008, 10:04 PM
I have the visuals for stone altars done, but tonight I worked on adding some functionality.

For now, I have the code in place that looks to see if a stone altar is adjacent to a given unit and if the altar has an aura. If so, the unit is able to cast a "Pray at altar" spell.

Praying at the altar applies a certain effect, and removes the aura. Right now, the effect is just to heal the unit. As I add more code, the spell will apply effects depending on the player's alignment and the type of aura. (For example, and evil player praying at an altar with an evil aura will get some benefit -- but the same player praying at an altar with good aura will get a bad effect: either a bad spell or a hostile summon.)

I will also make it possible for players to "recharge" the altar with either good or evil aura.