Ranged attacks - possible?

Exel

Prince
Joined
Nov 25, 2001
Messages
440
Location
Finland
I had a wild day dream about turning Civ4 into a tactical level wargame, somewhere between the level of Jagged Alliance and Steel Panthers, where one unit would represent either a single man or at most a squad.

But before going any further with the idea, one issue needs to be addressed. Such a game would obviously need a ranged attack system that currently does not exist in Civ4. A unit should be able to fire over several tiles, inflict partial, one-time damage to the enemy and without receiving any itself.

Now I'm asking if this is even remotely possible with the currently available scripting measures, or even with the upcoming SDK? Or if someone would be capable and willing to try it out?

Such a system could also have its uses in the standard Civ4 environment or other mods, so researching into the matter would be beneficial for others as well.
 
Firstly, I'm already working on exactly this sort of mod (see my post: http://forums.civfanatics.com/showpost.php?p=3547865&postcount=43)

Secondly, yes this is possible. Right now, I have infantry which are able to fire up to three squares away, though I'm planning to add code to create an engagement where-in if they're in range of their opponant's weapons, the opponant will fight back (ranges of weapons will be an important factor in this mod)
 
Déja said:
Firstly, I'm already working on exactly this sort of mod (see my post: http://forums.civfanatics.com/showpost.php?p=3547865&postcount=43)

Secondly, yes this is possible. Right now, I have infantry which are able to fire up to three squares away, though I'm planning to add code to create an engagement where-in if they're in range of their opponant's weapons, the opponant will fight back (ranges of weapons will be an important factor in this mod)

Great! I planned to work on a greater fire range for artillery after my current project. But yours will go way deeper into the game mechanics than mine. SOme questions :
- did you already solve the fire range issue?
- did you consider that the AI needs to be changed as well, so that its take use of the new capabilies?
- If so, how do you plan to solve this?
 
Secondly, yes this is possible. Right now, I have infantry which are able to fire up to three squares away

Wow. Care to tell us how you did that? I'm sure that feature will be very helpful for many other mods as well.

though I'm planning to add code to create an engagement where-in if they're in range of their opponant's weapons, the opponant will fight back (ranges of weapons will be an important factor in this mod)

I'm keeping thumbs up for you for that project. If you accomplish to do that, that will spawn some very interesting possibilities for Civ4 - reactive fire with Zones of Control... :drool:
 
Déja said:
Secondly, yes this is possible. Right now, I have infantry which are able to fire up to three squares away, though I'm planning to add code to create an engagement where-in if they're in range of their opponant's weapons, the opponant will fight back (ranges of weapons will be an important factor in this mod)

Can you please share how you achieved this? Would be really interested in applying this to one of my future mods. Maybe you could write up a quick tutorial and post it in the Civ4 - Tutorials, Reference, & Guides sub-forum, just an idea.

TheLopez
 
12monkeys said:
- did you already solve the fire range issue?
- did you consider that the AI needs to be changed as well, so that its take use of the new capabilies?
- If so, how do you plan to solve this?

1. Yes, I have a very rough ranged fire bit written
2 & 3. Yes, which I don't know how to do yet (haven't looked into it) but I suspect it'll require the SDK to accomplish.

Exel said:
Wow. Care to tell us how you did that? I'm sure that feature will be very helpful for many other mods as well.

TheLopez said:
Can you please share how you achieved this? Would be really interested in applying this to one of my future mods. Maybe you could write up a quick tutorial and post it in the Civ4 - Tutorials, Reference, & Guides sub-forum, just an idea.

TheLopez

Right now it's not very efficient. It's just a messy proof of concept at the moment. I would be willing to write up a little how-I-did-it if you would be interested, however.

In case you're curious, there's a magic spell mod that helped me see how this sort of ranged mod is possible. You can find it here: http://forums.civfanatics.com/showthread.php?t=151941

Without that demo, I wouldn't have gotten very far.
 
Déja said:
1. Yes, I have a very rough ranged fire bit written
2 & 3. Yes, which I don't know how to do yet (haven't looked into it) but I suspect it'll require the SDK to accomplish.





Right now it's not very efficient. It's just a messy proof of concept at the moment. I would be willing to write up a little how-I-did-it if you would be interested, however.

In case you're curious, there's a magic spell mod that helped me see how this sort of ranged mod is possible. You can find it here: http://forums.civfanatics.com/showthread.php?t=151941

Without that demo, I wouldn't have gotten very far.

Déja,

I would love to see a how-you-did-it write up, I am very interested. Maybe I can use my SW developer skills to help you refine it since I would like to use it as well.

Thanks again,

TheLopez
 
That kind of a feature is not only needed for the type of scenario I described in the first post, but also - and perhaps even more importantly - in creating true ranged artillery. So yes, if you can share your knowledge please do so. And any development you can do on the matter is greatly appreciated by me and I dare say by the whole community.

If you can achieve reactive fire... well, suffice to say that the possibilities would be endless. Think counter-battery artillery for instance.
 
I have spellcasters in my mod that can throw fireballs and other spells at different ranges (depending on the spell and any promotions the mage has that effects his range). The AI uses it just fine.
 
TheBladeRoden said:
So when a unit gets a range of three does it end up being square shaped or circle shaped?

I'm making it go into a circle, but it'd be even easier to make it into a square.
 
Kael said:
I have spellcasters in my mod that can throw fireballs and other spells at different ranges (depending on the spell and any promotions the mage has that effects his range). The AI uses it just fine.


Do the fireballs require a "mission" button to activate?
 
Kael said:
I have spellcasters in my mod that can throw fireballs and other spells at different ranges (depending on the spell and any promotions the mage has that effects his range). The AI uses it just fine.

...And the good news keep coming in. Could you explain how your system works and/or copy the code here?
 
Is it possible to have Civ II-style missile units? I know the ICBM is, but that has an unlimited range. Is it possible to program this into the game or what..?
 
Exel said:
...And the good news keep coming in. Could you explain how your system works and/or copy the code here?

Its nothing special. A fireball is a unit like any other. It is just created when the mage casts the spell (just an initUnit) and is deleted after combat (regardless of it is wins or loses) or at the end of the players turn, whichever comes first. You could do the same thing and give Siege Weapons an action which allows them to summon a stone or whatever.

The first pick is a mage throwing a fireball the way I have it now (with the fireball as a Domain Land unit). The 2nd pic is the fireball as a Domain Air unit. I don't use domain air because the AI seems to treat it differently, but it may work well for you.
 
If the projectile is a domain land unit, doesn't it allow for the "unit" to be moved in a changing path, or is there some way this is limited by only allowing it to move on a target?
 
Exel said:
If the projectile is a domain land unit, doesn't it allow for the "unit" to be moved in a changing path, or is there some way this is limited by only allowing it to move on a target?

Like you say you could move it in a changing path if you wanted, but since its going away at the end of your turn its just a waste of move points.
 
Kael said:
Like you say you could move it in a changing path if you wanted, but since its going away at the end of your turn its just a waste of move points.

Perhaps. But it could be exploited and used to scout fog of war. Of course for ranges of just a couple of tiles this is not an issue, but for weapons that have greater ranges this could be a problem.
 
So by the same token one could have Arleigh-Burke destroyers 'create' tomahawk missiles?

Or have subs 'create' torpedoes?

And is it possible to build big missile units or do you need to spawn them from a carrier?
 
Back
Top Bottom