Samurai fishing boat improvement

ExpiredReign

Deity
Joined
Jan 3, 2013
Messages
2,450
Location
Tasmania
With the new Samurai fishing boat improvement allowing sea resources to be improved without consuming the unit, I thought it might be worthy of discussion how we might use it for workers in general.

The actual code involved with allowing the Samurai to build fishing boats is very basic. It is just another BuildType, like mines, farms, quarries etc.

All that is involved is giving that BuildType to workers:
Code:
<Unit_Builds>
 <Row>
  <UnitType>UNIT_WORKER</UnitType>
   <BuildType>BUILD_FISHING_BOATS_NO_KILL</BuildType>
  </Row>
</Unit_Builds>

The AI should handle it in exactly the same way as all other builds.
I haven't yet examined the pillage costs from this improvement.
Should you gain more or less from pillaging fishing boats now a unit is not consumed?
Does this mean, if applied, we should revert fishing boats back to their vanilla costs? I think so.

Another thing to keep in mind, although fishing is available from Sailing, the unit will have to wait for Optics to embark. This is a situation the Japanese Samurai don't have to face as they become available long after these tech requirements are met.
Do we allow embarkation at Sailing? I don't think that is desirable.
Perhaps fishing boats can fill the gap until Optics is gained?

It may even be the case that boats are used initially and workers can be used later when/if those tiles are pillaged, or when the tile is not easily reached by a fishing boat. (on another ocean with no port access)
 
Update on pillage costs.
Currently Fishing boats are rated the same as Camps, Plantations, Pastures, Lumbermills, Kasbah, Moai and Brazilwood Camps. Vanilla values of 10:c5gold: and CEG values 4 times that at 40:c5gold:.

Based on those figures I don't see any reason to adjust them if they are now built without consuming a unit.
It does however make me wonder why they were so cheap, pillage wise, before. You have to build a new unit and then assign it to the resource but it only gives the same as a Camp!:confused:
 
This unique ability for a Samurai seems really weak and lame. Sounds like someone came up with an idea that they thought was cool, but it's practically worthless in a game. I sure hope we can do better.

As far as regular workers being able to work sea tiles, I'd rather not have them have that capability. We'd never build work boats.
 
If I understand you correctly and we can't give them the oil platform command as well, what's the use? If we can't eliminate the superfluous workboats all together, it's not worth the effort.

I do think we can give civilian units the embark unit one tech earlier to make fishing boats usable at that point. I don't think it's overpowered to allow civilian units that ability, they can't explore far anways on their own...

But yeah, I'd like to get rid of workboats... ;)
 
we can't give them the oil platform command as wel

Not exactly. We can give them that ability but they would be consumed as a work boat would.
So in that case it is possible to eliminate work boats completely.
Agreed, the ability for civilian units to embark wouldn't impact on the game adversely.

I'll make a quick change and see what it looks like, and then let you know how it goes.
 
Well so far I have learnt two things:

1) The small test map that I got from Thal many moons ago doesn't allow me to use any mods created with the new content in the patch.
I spent hours pulling my hair out trying to understand why a tiny mod with so few edits was failing to load. I finally tried a different map and it loads perfectly and modifies all I expected it to.

2) The "simple" approach somehow is not working. After adding all the changes I can see the Samurai has to the worker it still fails to provide the build command to construct fishing boats. I'm stumped. (For the time being)
New UnitAI, UnitBuilds, Unit_FreePromotions and even removed the "Kill" option to making fishing boats. Still no go.
 
Well this is starting to p*** me off.
I just found a post by WHoward regarding some of the "quirks" of the C++ code used in the patch.
In it he cites a block of code from CvUnit.cpp that I will post here:

Code:
if ((isEmbarked() && !pkBuildInfo->IsCanBeEmbarked())  && (strcmp("UNIT_JAPANESE_SAMURAI", getUnitInfo().GetType()) != 0))

Now I am not 100% sure, but to me it looks like Firaxis has hardcoded the Samurai ability into the C++ code.

What are they smoking at Firaxis? Why hard code this? Damn, damn and damn!!
 
That's definitely a mod-related feature, if for no other reason than that it really doesn't make any sense on the samurai unit to begin with versus a worker as something we'd like to be able to do.

It adds only that you don't need work boats in the mid-later game to Japan but gives nothing in the early game. It would at least be interesting if workers for Japan could do this and other civs could not, or just if workers could it generally for any civ. Why it needs to be hard-coded and limited, I don't understand that decision either.
 
Lol wut? If it possible the extra expense for oil platforms is a minor issue. It will not be elegant, but it is not that hard to spare a worker in the modern era. The difference is also only 70 gold or20 hammers.
 
@chumchu

Unfortunately it has come to my attention that the new samurai ability is hardcoded in the C++ code of the DLL file.
Any attempt to use any other unit besides the samurai will need a DLL mod to overcome it.
You may thank Firaxis for this monumentally stupid design flaw.:mischief:

Sorry. You had a good idea there for a while.
 
Even if you fix that line, the AI will never use workers to build at sea, as there are several other places in the C++ code that limit workers to their domain - so workers only build on land and workboats only ever build at sea.

Actually its worse than that, in that the AI will never consider any unit but those explicitly designated as workers (via their default UNITAI_ value) for building things - which is why AI Roman Legions never build roads or forts and (related) why AI Conquistadors never found cities
 
Thanks again whoward69.

Yes, after noticing your post about some of the updated code Firaxis released, especially the point about the Samurai, I had a quick look through the rest of the SDK to see what other "brilliant design choices" they made.

Unbelievable. How a large company with a team of, apparently, talented coders can make such stupid decisions about where and how game functions work. It staggers me.

I too saw those points about UNIT_AI, wish I had looked earlier.:(

After making such a fuss, pre-release, of the initial game's ability to be modded and how they encourage the work of modding communities as a whole. They shoot themselves in the foot with poor code like this.:crazyeye:
 
That is some truly impressive work. Your skills never cease to amaze me.

Alas, for the scope of this mod we are steering clear of DLL changes. At least for the time being.

I would love eventually to see ALL the DLL code in one mod and we just call those functions we want for each mod. Then we can just keep the DLL updated and all the separate modders can call upon it whenever or wherever they want.

Maybe one day.
 
Back
Top Bottom