Ship/Vehicle Upgrades and Addons

Kailric

Jack of All Trades
Joined
Mar 25, 2008
Messages
3,100
Location
Marooned, Y'isrumgone
Created a thread for these ideas

I don't think it was discussed in great detail, but the concept of regions of space, which becomes available later was a topic at one point.


Remember the eastern states are in the western hemisphere, but the western states aren't in the eastern hemisphere :crazyeye:


I want to be more original than that. Thinking about it, I came up with a new ship system.

We create a new unit type. It can't move and is build with hammers. It can be loaded onto ships and while the unit is in the cargo hold, it provides a promotion to the ship.

Ideas for "ship unit addons"
  • Sea rations
    Can move into high sea plots
  • Long oars
    Extra movement
  • Crow's nest
    Increased vision range
  • Longboats
    Can drop units onto land without a port
  • Balista
    First strike, possibly attack bonus
  • Shield wall
    Defence bonus

This way it is possible to take a standard ship and customize it into what we need. Say we need a great explorer, we take Sea rations, oars and crow's nest. The ability to move everywhere, high movement and 2 plot vision makes it great at exploring the sea. However it has used up all 3 cargo slots and if you want to explore the land you discover with it, you have to send another ship with long boats, sea rations (if needed) and the scout.

Likewise it is possible to sacrifice the entire cargohold for increased combat stats, making it a pure warship. On the other hand, adding nothing provides a good sized cargo capacity and you can move stuff around. Also take into consideration that the addons aren't free. This will really add something to the currently oversimplified ships.

We can prevent some ships from gaining certain promotions and some gain them even without a unit in the cargo hold. For instance a viking longboat doesn't need longboats to drop berserkers on the shore.

One bonus with this approach is that a fair amount of code already exist for promotions meaning most of the coding is "just" to add a promotion to a ship when the unit is loaded. Once that is possible, the code for most of the promotion ideas are already present and will be pure XML coding.

That is pretty cool, I like that idea a lot, especially if we can xml it so that the unit gets a tag like ispromotion, and everything else is purely xml based i.e. make the unit, make the promotion.

This will be cool for WHM when you get to the stage of planes, tanks, helicopters and cars, as you can add stuff like bombs, missiles, machine guns, up-armour, all terrain suspension...

Nice!

If it could also be made that certain units can only carry 'promotion units' this system could be expanded to include even human units, so infantry could be given tower shields or body armour, or gps navigation, or workers could carry dynamite for mine work.

The possibilities could just go on and on!

Did FFH2 have a system of Items being carried by Units? I know they had magical items but not sure what they did with them. Anyway, I love this idea and I had similar ones for a Fantasy based mod with the above mentioned Magical Weapons/Relics.

I am not sure about the implementation of some of the more command items that units could carry. Like for the examples Night gave, the Sea Rations and Balista would be a good addition but more minuscule items like crows nest or body armor would seem to work best as a Empire wide Tech addition.

But this would be a cool way to customize units for certain roles and not have them locked into those roles. Ships were "refitted" at all times. In my Privateer mod you could take any Ship and refit it to be a Privateer.

They did it in a totally different way. A magic item is a unit. If you have another unit on that plot, it can do a command to pick up the item. If it does, the item disappears and the unit gains a promotion. If it drops the item (command available if it has the promotion), then the promotion is lost and a new item unit is generated.
There are 3 ship promotions, which can be selected in port. They give +1 power, movement and cargo respectively and selecting one will disable the two others. You can switch in cities.

(at least that's how I remember it)


Those were examples on what the concept can handle. Figuring out actual addons and how to balance those might take more than the 2-3 minutes I spend on the examples.

As for stuff like crow's nest being empire wide.... I kind of like the concept of having too few cargo slots for what you want and hence have to decide tradeoffs when outfitting your ships. Maybe it isn't totally realistic that a crow's nest takes up a cargo slot, but I think it will work well from a gameplay point of view.

Considering that all they do is to give promotions, we can let addons give promotions, which can be gained in some other way too. Say we can build crow's nest addons at turn 50, but at turn 200 we gain a civic (tech), which gives a free crow's nest promotion to all ships or certain ship classes. We also have the option of allowing the promotion though experience, which will make the ship keep the promotion even if the addon is put back in the city. We can also limit the experience promotion to certain ships while more ships can use the addon etc. The feature design allows an extreme degree of freedom when setting up in XML.


If I read the replies right, we all agree on the DLL part of this feature. However the XML part is more vague. We need to figure out what specific addons we want and their effects.

AI is an entirely different problem. Not sure what to do about that one yet.

I added a ticket for this idea:
https://sourceforge.net/p/colonizationmodcollection/sourcetickets/1/

We should add tickets for all feature ideas as well as bugs. That way we have a searchable list and we have less risk of forgetting good ideas. As it isn't meant to run in parallel to the forum, I just linked to this thread for details. I assigned myself as owner of the ticket meaning I will be the one coding it (once I get my compiler up and running again).

It would be nice if people would add ideas and bugs to SF.

Yeah, I knew that I just wanted to put my 2 cents in, you do me the same way :mischief:;)



Yes, its simply things like this that can really make the game fun. I am sure we could all come up with some cool ideas on how to work this. We could also have Human Units that give Promotions to Vehicle units like Ships when traveling on them, like an Expert Seaman promotion.



Yes, this would work great for the WHM and also in the Miniaturization effect where techs makes things easier, smaller, and sometimes menial. So you want have to worry about equipping your Battle Cruiser with a Crow's Nest ;)



We could probably come up with a simply solution to start with that simulates the AI using this system, and then as the system gets more complete and tested we can code the AI for it.



Those are a good way to keep track of the additions. If Lib doesn't post the new features we are working on there, then I'll do it.

Yes, I like Nights suggestion with the idea of 'early prototype upgrades' (like a crows nest) being available to some early ships (via upgrade blocks), and then eventually (with technology) these effects can become standard promotions for all ships.

Principle works the same in cases like body armour too. You could have it collectable, then in the future a tech or civic (or even a profession types) could gain the body armour promotion as standard (allowing them to take something else) It would be like Infantry(no body armou) Storm Trooper (Body armour as standard).

I say go on the implemtation of the system. Special effects, would come under development of new promotion tags.

TLO Tags Link

Would be a good one to look at for ideas on additional promotion effects. I have it implemented in FTTW and it has come in handy for a few different things.

I am still struggling to navigate SF.

Or maybe only ships with Great Admirals/Explorers (you have one of these, right?) can venture initially. Later on, more advanced ships can do so too.

Just to make note there is a function in CvPlot called canSeePlot(), which uses <iSeeThrough> in TerrainInfos. This may could be used to perhaps hide areas.

From a technical point of view, unitInfo will contain a promotion (default NO_PROMOTION), which is the one given to the ship when the unit is added. This mean we could add such promotions to all units. We could make a slaveship promotion for ships carrying outlaws. Also we could make some sort of admiral promotion if we like. It makes no difference to the DLL.

Maybe master carpenters would give a promotion to increase heal rate and possibly heal while moving.

One thing, which would affect the DLL is if professions would also give promotions. I'm thinking that placing archers on the ship would increase combat strength. I'm not sure about that because it seems to be a whole lot more work, not to mention potential slowdown.


I have been thinking something like that too. However once you start looking at details, it starts to become more complex, partly because it is one of those functions where we have to pay attention to performance. With a more detailed design goal for what we want and possibly a cache in CvUnit, it should be able to deliver precisely what we want.

Another interesting function for a high sea implementation would be CvUnit::canMoveInto().

The one thing I wonder about with this upgrade stuff, is a display issue, where will all these constructions be kept, as it could turn the build screen into a complete mess! :D

If we could make a 'blank' upgrade to be built and then have it changed to a particular upgrade through the professions screen, it would look cleaner..

But performance is also an important issue to consider. (I don't know about that junk!)

Performance is not really an issue for the build screen. It doesn't really matter if it takes 0.02 seconds extra to open. However 0.02 seconds for each call to CvUnit::canMoveInto() would break the game as the AI might call it a million times each turn in which case the end turn wait will take an additional 5.5 hours. In other words, performance issues are mainly a question of how often code is called.

You are right that we should consider what to do about the build menu. I assume it is generated somewhere by looping all build options and store a list of available options. There is some sort of sorting as units and buildings aren't mixed together. I think the obvious choice would be to hook into the sorting code and group add addons together.

I don't think the build menu will really be an issue. Maybe we want to improve it, but then we shouldn't think how to add addons, but rethink the whole design and that would be out of scope for addons.

My comment about performance was in connection to professions and slow down that you stated.

The benefit of being able to tie the specific upgrade to a profession is that that list filters from available supplies and such and is also disconnected from the build list.

You can also filter out professions based on certain things like promotions (Knights need the honoured promotion, at least I think that is still how it works.)

So we can have things like 'Ship Upgrade' and 'Troop Upgrade' and 'Civil Upgrade' promotions that would filter the list of Upgrade professions, so that you only get the list you want of upgrades. This way the building list does not get over cluttered.

Just making them separate in the Build listing would be pretty easy as Night pointed out. There is already a separation of the FF points you can build.
 
I also like the idea of building upgrades and attaching them to upgrade slots in ships and other kinds of transport. It has always been a bit unfair for a freighter the need of winning a battle to benefit from upgrades and not being able to build these at a ship yard. Also, your first Caravel is usually a veteran after many fights and you are not able to upgrade it with more cannons or one more cargo hold and you end up using it as a ferry to a distant island in your lands.

Nightinggale proposed the idea of sea rations to be able to cross ocean tiles, but in a productive game as this is, why don&#8217;t make it REAL food? A ship should be loaded with real food that is consumed by the transported troops or even the ship crew. Therefore one of the ships slots is used for that load. Bigger exploration enterprises should need more space for food. And you&#8217;ll reach one point where half of the food is eaten and you have to take the decision of going back to your lands for extra food or going on at a risk of losing the expedition: Fear.

In later stages of WHM a steamer would consume coal, so you need to buy a couple of refilling ports with collieries alongside your routes, exactly the way the British Empire did to supply their colonial voyages.
 
Nightinggale proposed the idea of sea rations to be able to cross ocean tiles, but in a productive game as this is, why don’t make it REAL food?
That was my idea until I came up with the concept of units providing promotions. The problem with "fuel" is that it quickly gets really complicated to code. Say a ship use one unit of yield for each move. Imagine wanting to move 5 plots with only 4 fuel left. Modifying CvUnit::canMoveIntoPlot() will not work because it will check if there are at least 1 unit left and do that for each plot. As all 5 plots are checked before actual movement, it will allow planning the movement of 5 plots and then get stuck after 4 plots with possibly undefined behavior.

Making a simple promotion to allow access to a certain terrain will simplify the movement code alot. It is just a check against current abilities and those abilities will not change as the unit moves.

Another issue is that we can kill the gameplay with micromanagement. We are already talking about the need to automate prospecting because doing it manually is no fun in the long run. Fuel for ships will likely be even worse and not really possible to automate. No automation is an issue for the AI and it will be a serious balance issue if the AI can cheat with something this important.
 
Well, instead of preventing movement, starving units could lose health, that code would be simple. Each move or turn takes away Food, when there is no Food left the units starts losing Health each move or Turn, until it dies. The AI would need to be trained in this though, or simulated for them. Still, its more Macromanagement, but there are games that require fuel in combat. I've played some before and I remember it added to the overall strategy. This could be made into an option for people who would like more depth.
 
That was my idea until I came up with the concept of units providing promotions. The problem with "fuel" is that it quickly gets really complicated to code. Say a ship use one unit of yield for each move.

Would it be better to use one fuel not for one tile but for one turn?
Units with no fuel would stay there next turn in the same way as when a ship is sentry. In this case the ship is forced to remain sentry until their crew has died of starvation (ship taking damage). No strange gameplay concepts. It is true though, that the game doesn&#8217;t allow the transfer of goods between ships at high sea for refilling purposes.

Well, instead of preventing movement, starving units could lose health

Starving units because of lack of food is a most interesting strategic feature in an exploration and productive game. In my opinion, vanilla should have come with this feature, or at least as an option. This way, outposts will regain their main function and exploration must be planned beforehand.
 
In Fury Road, Davidallen did a bit of refuel code in python.

Basically, cars would start with a 'full tank' promotion and after X moves it went to 3/4 then 1/2 then 1/4 then empty.

Special fuel trucks could be spawned to refuel immobile vehicles.

He also had AI for this as well.

There was also a promotion that removed the need for fuel.

Might be worth looking at as a simpler system, or for ideas about this.

I agree with the naysaying though, I think loading 'fuel' of what ever form will get really tedious.. Especially for things like short range traders that are just automated back and forth... I can already feel the headache. :D

An alternate system might be something like 'range' where each 'fueled' unit can go for X turns before stopping/starving/exploding whatever.

When a ship returns to a port it's refueled back to it's max turns.

It could also be linked by certain buildings for certain units.

So Port for ships, coal station for coal ships, petrol station for cars, etc.
 
There are lots of options for fuel. It could be free to move inside allied plots, Ships could be restricted to be within X plots of nearest port etc.

However I don't really like the concept of fuel. The original idea with units, which brings a promotion is simple, both regarding gameplay and implementation. Fuel isn't really part of that concept meaning if we ever get fuel, it will be a totally different feature with different coding and stuff.

If we look at gain vs coding time, I say something like fuel sounds really expensive and there are a whole lot of other features I would want to get finished before even considering something like that.
 
I think fuel/range is only going to become important in the scope of WHM. It only really becomes valid with global exploration and modern warfare logistics.


In pre modern times, armies traveled on their stomachs so fuel then would be food. Fuel would be a neat thing for perhaps a scenario, like a World War Mod. But, like Night said this would be a separate addition.
 
I meant more from a gameplay persepective rather than a historical concept. The army needs food concept, I think would be more bundled up in the upkeep costs of armies.

Armies could forage and take supplies from captured cities. The food supply situation would be more like a max units per tile issue (as in how many people can a stretch of land support)

In Kmod it has a promotion that is applied to units in a stack when there are more than 10 units (or something like that) which gives a -10% strength.

With slow moving armies, you generally just roll from one ctiy to the next, so you are going to find it difficult to 'out range' yourself logistically.

It would only really become significant when trying to get from one continent to the next, where you need to build port settlements to reach from europe to africa and into the orient for example.

Or with fast modern units that could conceivably strike 3 or 4 cities deep into the enemies territory. (or all over the world)
 
Top Bottom