game_noTreeReclaim

I’d like to request to have this removed.

I think it’s silly to have it in it’s current state because:

  1. it’s easy to work around it by using fight/patrol commands instead
  2. it blocks area reclaim (salvage) on positions with x coordinate < 10000 (probably bug?)
  3. when fixing the above point, area reclaim can also be used to reclaim trees
  4. reclaiming units isn’t possible
  5. it gives bugs ocassionally (reproduce by trying area reclaim on map position with x coordinate > 10000)

If anything I think it would be a better idea to remove the reclaim/salvage command entirely. Since features and wrecks are all set to give no command/logistics anyway, it is quite pointless. (I’ve not yet noticed any battle in which engineer was needed to clean wrecks because otherwise tanks couldn’t pass…)

I’ve had one such game, although often it’s easier just to destroy the wreckage using HE shells.

Please do whatever you like with it. The only reason it exists is to keep people from sucking up trees to get ammo. As long as that is accomplished I don’t care at all how it’s done.

Since reclaiming is pretty much entirely broken currently anyway, I’ll just add ‘canreclaim=0;’ to all engineers / con vehicles and remove the then obsolete LUA code, if no one opposes before I’m motivated to do it :slight_smile:

On related note, does anyone have any clue why this is in that same gadget? Are there even selectable features? And why shouldn’t user be able to select them?

	function gadget:Initialize()
	    for _,feature in ipairs(Spring.GetAllFeatures()) do
	        local name = FeatureDefs[GetFeatureDefID(feature)].name
	        if name and string.find(name, "treetype") ~= nil then
	            Spring.SetFeatureNoSelect(feature, true)
	        end
	    end
	end

What should be done is simply force all features to give 0 resources when reclaimed, not prevent reclaimation.

I think we should prevent reclaimation at the engineer level, not give features no resources. Frankly, this started to annoy me when sometimes Engineers on patrol sucked up buildings I was using as cover on Kiev. If an area needs to be cleared, we can toss grenades at it. Reclaim as a game dynamic currently has no place in S44.

This is already done, as far as I can see, although yesterday I was unable to find the code which does that.

Yeah, I tend to agree, it looked silly when in earlier versions of C.R.A.I.G. it sent engineers with a fight command with it’s army, which then reclaimed entire villages and forests, just because they could :stuck_out_tongue:

EDIT: On the other hand, while reclaiming entire villages by engineers is a bit silly, reclaiming trees actually has it’s use: to create better paths through forests. It’s the only actual use about which some new people asked questions recently. (e.g. Is there a better way to remove trees to create a path for my mortars then shelling them with mortar fire?)

Ok, then we want reclaiming to be disabled for everything but trees, which give 0 resources when reclaimed. That should still be possible.

What about reclaiming structures? (your own and enemy)

Isn’t possible in Operation Luettich, is possible after adding a missing “return true” in the gadget.

Next to reclaiming trees it could have some use, though in general I think economy isn’t that precise in S44 that it’s an advantage to reclaim something for the command it gives. (E.g. reclaim barracks to go vehicles faster…)

EDIT:

Hmm this seems to be more complex issue then I thought at first, normal trees aren’t set to give 0 logistics after all, seems that’s impossible engine side.

This also means that there’s an exploit currently to get logistics from trees: use fight/patrol on an engineer near an engine default tree forest. Each tree gives 250 logistics. To reproduce, start a single player game on bocage small, /cheat /give 5 gerstorage, then give an engineer a fight/patrol order near some of the trees. You’ll see stored amount of logistics rising.

Also I found out what the noselect for features does, it hides their tooltip.

Fixed the exploit. Reclaiming features does not ever give any resources now.

Feel free to revert the last point if insta-reclaim is desired.

I tried making all features except default trees not reclaimable (easiest to do this is adding fd.reclaimable = false to featuredefs.lua near line 64), but this is more frustrating then desired. For example, you then can not reclaim tiny grass/bush features anymore to make space for base building. Ideally maps should be fixed to define e.g. villages as reclaimable=0, it’s hopeless to patch around map bugs in the mod using silly heuristics (to distinguish villages from bushes/trees) .

Note that the original approach using AllowCommand is tedious too, due to the way area reclaim, fight and patrol are implemented in the engine. AllowCommand is called only with a reclaim command once for entire area reclaim and never with reclaim command for fight and patrol, so effectively you’d need to reimplement area reclaim/fight/patrol entirely in LUA to fix this… I’ve put making engine side fix on my to do list :slight_smile:

There is still no reason to reclaim trees. People can cut them down with gunfire, and it would be more game-reasonable to give engineers a “Hatchet” spoof for the mechanic anyway.

Differentiating between tree reclaim and other (debris) reclaim is technically infeasible (see last paragraph of my previous post.)

Feel free to block reclaim entirely and remove the Salvage/Reclaim button from the GUI tho.

I think what you set up is perfect, Tobi.

Always cleaning up my code-messes… :stuck_out_tongue:

I think removing it entirely is probably better but, hey, we will see.

Fixed it a bit more anyway; now only features and your normal base buildings can be reclaimed. Reclaiming infantry, tanks, vehicles, deployed guns, etc. isn’t possible anymore (that introduced some exploits).