Quick Modding Questions Thread

Is it possible to make so units can only attack on adjacent tiles?

Will the AI be able to manage this limit without extensive coding?

What would I have to do?


Thanks to anyone answering :)
 
Ai WOULD be tough. Very complicated!

The limitation probably wouldn't be too difficult but do understand you'd need to have a firm grasp of dll SDK modding to pull it off. That's a hard earned skill but if I can learn it I'm sure most anyone can. Nevertheless... I'd suggest trying to start with an easier project because you'd be tweaking some of the more complex portions of the code to achieve what you propose.
 
THANKS for the precise answer. ;)


Just asking, what if I only change movement points of all units to 1?


I'm a bit disappointed because this is the simplest thing I came with, the others I considered to be far more difficult.

Maybe it will turns out to be more simple. So I ask:


I also would like some units to automatically die after X turns (for old age), would it be possible and hopefully simpler?
 
Hello,

I recently had an Idea to add Greece and Eastern Libya to Sword of Islam. I discussed these ideas with some other members, but I can't mod, so I need someone to do it for me. I would be really grateful of somebody could do this.

The provinces are shown in a map in the thread linked below. The map will only be expanded to the west (I forgot to crop it). In addition, the new part of Africa that is not in Libya will be part of the province Sahara. Lower Egypt should be extended west to attach to Libya.

The Byzantines will gain the following cities as a result of the map expansion:

Athens
Salonica
Mystras
Patras
Larissa
Christopolis (modern Kavala, Greece)
Philipopolis (modern Plovdiv, Bulgaria)
Arta
Dyrrachium (modern Durazzo, Albania)
Heraclion (Crete)
Rhodes (independent in SoI)
Corfu
Hermopolis (modern Ermoupoli, Greece)


And These two will be added to Anatolia to more accurately reflect how populated the region is
Halicarnassus (modern Bodrum, Turkey)
Samsounta (modern Samsun, Turkey)

These cities will be settleable in North Africa:
Benghazi, Libya
Tobruck, Libya
Paraetonium (modern Mersa Matruh), Egypt

Discussion is here
http://forums.civfanatics.com/showthread.php?t=507860
 
THANKS for the precise answer. ;)


Just asking, what if I only change movement points of all units to 1?


I'm a bit disappointed because this is the simplest thing I came with, the others I considered to be far more difficult.

Maybe it will turns out to be more simple. So I ask:


I also would like some units to automatically die after X turns (for old age), would it be possible and hopefully simpler?
While it would still require either dll or python coding knowledge (I personally find SDK easier but most would say python would be easier) it would be much more basic a project and not too bad to start with. AI wouldn't be mandatory though you might want to consider any changes in strategic decision making such an effect may prompt that the AI should be adapted to somehow and THAT sounds a bit complicated to me.

Interesting... that's actually a project on my list for Heroes and Leader units in C2C but it's a long ways off from being necessary for now.
 
I also would like some units to automatically die after X turns (for old age), would it be possible and hopefully simpler?

Interesting... that's actually a project on my list for Heroes and Leader units in C2C but it's a long ways off from being necessary for now.

I always found this to be very irritating because the hero or whatever would die of old age before they got to the front lines let alone into battle.
 
Simple.
Just give it a x% chance to die after each battle which increases with level.
Thus, heroes doing nothing in cities won't die, so at least you get to use them before they die.
 
THANKS to both for their answers. :)


However, I actually wish to do/have this mod mainly for a matter of realism

and also so that NON used units will get removed

without having me to scroll all map and check their biddings one by one and eventually kill them

(the world-travelling scouts come to mind)


What about the other idea?

Just asking, what if I only change movement points of all units to 1?

Thanks.
 
THANKS! :):):)

What would be the consequences for the AI?

Would it be able to manage a roster of units with 1 movement point each without heavier intervention?
 
Then what is the point of mounted units compared to others?
What is the use of withdrawal chance if you cannot move away to safety?
How many turns you need to make a naval invasion across the ocean?

There are many units in game where the high movement point is what makes them useful, like Gunship.
Does it really make sense for a gunship to move as fast as an elephant?
 
Simple.
Just give it a x% chance to die after each battle which increases with level.
Thus, heroes doing nothing in cities won't die, so at least you get to use them before they die.

Is it possible to give them a x% chance after each turn instead? (regardless of activity)
 
Then what is the point of mounted units compared to others?
What is the use of withdrawal chance if you cannot move away to safety?
How many turns you need to make a naval invasion across the ocean?

There are many units in game where the high movement point is what makes them useful, like Gunship.
Does it really make sense for a gunship to move as fast as an elephant?

I know. :(


That's why I first asked if the desired effect - attack only when enemy is reached - was doable.


And that's why if it would being too hard I would apply such a workaround only to land units, and not to naval ones.

Also this would have the side effect to encourage the use of large fleets to embark them (at least in some kind of maps, such as arcipelago, would be useful).


And maybe the creation of a "land transport" unit with good movement and no combat value will do the trick

-since STACKS are what matters in the game and they do not move at the speed of the faster one, such as mounted ones, if they are diverse,

thus making a diversified army with different bonuses an advantage (currently, you better create a SOD of mounted units, making all else useless in fact as you're too slow).


Reason is I play many strategy games and I found this one the greatest for the options you have but completely lacking in the combat part. :cry:

Why did they not use a tactical map in first place... If only at least units have to actually MOVE to the point where which they want to attack.

Currently, an arrow cross the miles between two enemy cities with control of everything in between. :mad:
 
Is it possible to give them a x% chance after each turn instead? (regardless of activity)

It is not a matter of whether it is possible or not but whether it is worth doing...

It simply means, every turn, loop through every unit, roll a dice, jackpot you die.
Obviously in big maps, you end up looping through 1000s of units every turn.
 
Well for me it is worth doing, as I said my aim is for more realism, like in other titles. That's entirely in one's person tastes.

The point is if it is an easy project for a starter or not, and what the side effects may be.


You noted the dice would roll for all the 1000s of units each turn, is it too heavy a charge for the machine to calculate, it would slow down the loading, or whatever?


Also, I have no interest in units dying at the next turn after their creation.

They have to die for old age, so if there was a way to apply the chance (a very high one) and roll the dices just for those units which are still present after X turns from their creation, that is not too difficult, that's it.
 
It is not a matter of whether it is possible or not but whether it is worth doing...

It simply means, every turn, loop through every unit, roll a dice, jackpot you die.
Obviously in big maps, you end up looping through 1000s of units every turn.

Well, realize that its already looping through the same 1000s of units per turn and doing much more complex things with them so I don't think this would be a significant slowdown.

Also, the world-travelling scout can be (partially) rectified by
1: Making some terrains (deserts, ice, tundra, maybe jungles) damage a unit a certain % per turn (you can get the code from C2C or Final Frontier). That way, units in your homeland would be immortal, but if they leave, on long military campaigns or explorations, they will be damaged, or even killed by the hostile terrain.


2: Prevent units from healing outside of your land unless they are on tiles occupied by a "supply train" unit (you can get the code from the Charlemagne mod). This way, 1: you can limit the speed of "Stacks of Doom" since they have to drag slow supply trains or suffer terrain damage (very much a reality of military campaigns) and 2: scouts, spies, explorers and missionaries will be limited in how long they can be abroad.
____________________________
As for your idea to make it so that all units must attack from an adjacent tile, I don't think that is at all realistic. https://en.wikipedia.org/wiki/Hit-and-run_tactics are a fairly common military doctrine, not to mention guerrilla warfare.

However, as I mentioned above, supply trains would actually do approximately this, significantly slowing down armies. As for how this affects the AI, I'm not sure, but check AI behavior in "Charlemagne", which comes with BTS
 
Well for me it is worth doing, as I said my aim is for more realism, like in other titles. That's entirely in one's person tastes.
:mischief:Except that at the start of the game one turn can be hundreds of years!

You noted the dice would roll for all the 1000s of units each turn, is it too heavy a charge for the machine to calculate, it would slow down the loading, or whatever?

if you are doing it in the SDK you can add the code to the current loop(s) so would not add significant overhead. If you are doing it in Python you are adding a new loop so the overhead (turn time) may become noticable.

Also, I have no interest in units dying at the next turn after their creation.

They have to die for old age, so if there was a way to apply the chance (a very high one) and roll the dices just for those units which are still present after X turns from their creation, that is not too difficult, that's it.

See my first comment.

Unfortunately I can't see a built turn value on units like there are on buildings. This means you would need code one which means saving an extra bit of data about each unit. That can be done in Python and SDK but it complicates things.

Having units die at random like this may make it difficult to get one experienced enough to build national and great wonders that require a units of x levels of experience.
 
:mischief:Except that at the start of the game one turn can be hundreds of years!

Which honestly is a problem. There need to be many more early turns and early tech rates should be significantly slower, but I'm too overloaded with stuff to fix this.
 
Is there any way to get Barbarians to appear more often? (I am running raging barbarians, and am disappointed by the low quantity of nomads. I already increased their quality by letting them build better units)
 
Back
Top Bottom