Return-To-The-Roots / s25client

Return To The Roots (Settlers II(R) Clone)
http://www.rttr.info
GNU General Public License v2.0
478 stars 77 forks source link

Nation specific catapult graphics broken #1521

Closed Spikeone closed 2 years ago

Spikeone commented 2 years ago

The addon "Race Specific Catapult Graphics" is currently broken. When fixing this, it should be renamed to "Nation Specific Catapult Graphics"

tehKaiN commented 2 years ago

I'm working on this issue, also fixing attack markers on my old Military Aid plugin. I can't remember how I've positioned the indicator - I think it was top right like on construction hints, but that spot is kinda busy because of flags. I also experimented with placing them in bottom-left, but they occasionally get covered by trees and settlers passing by (e.g. near hq or coal mine on the picture). The TODO part in code indicates placement on doors, but that's off to me too. Any ideas?

obraz

EDIT: I've used building label text offset - I think it looks good enough!

obraz

Spikeone commented 2 years ago

Are you changing how this addon works? Since it did not mark existing military buildings in any way, did it? The guardhouse with an icon overlay looks pretty strange.

Also not sure what the first screenshot is showing - since I don't get why there are icons near the farm/iron mine/mill etc.? So maybe add a dropdown to select the aid level since I kinda liked the original idea of marking buildings spots available but marking all military buildings and building spots you possibly could use for military buildings adds quite some noise to the game when using build aid mode.

grafik

tehKaiN commented 2 years ago

Are you changing how this addon works? Since it did not mark existing military buildings in any way, did it? The guardhouse with an icon overlay looks pretty strange.

The first iteration of this addon, which was like I dunno, 8 years ago (?) also marked buildings which you're able to attack - similar to Settlers 2: 10th anniversary. Basically this addon was an attempt to recreate this functionality. I've came back to RTTR recently and found out that this functionality has rotten away during some kind of refactor.

My first screenshot is very debuggy, showing icon at every building just to test its layout across buildings of different sizes. The second one shows it working only on enemy buildings with revised layout.

Sure I can throw in a switch to select placement aid and attack aid, but I think it should come bundled as in 10th anniversary game.

Also, I got catapults working again. :)

obraz

Spikeone commented 2 years ago

The first iteration of this addon, which was like I dunno, 8 years ago (?) also marked buildings which you're able to attack - similar to Settlers 2: 10th anniversary. Basically this addon was an attempt to recreate this functionality. I've came back to RTTR recently and found out that this functionality has rotten away during some kind of refactor.

looks like I never used that addon then - although I could not remember every seeing an icon on hostile buildings, but sure, that could be wrong. Maybe enhance the description to reflect what this addon actually does, since it's currently pretty vague :)

tehKaiN commented 2 years ago

Okay, that intrigued me. I took a look and found exact moment where Military Aid was added to github repo and found this:

https://github.com/Return-To-The-Roots/s25client/commit/72f321f9fa06b1014242f3309def40a24c7b025e#diff-ec23a1ff04121b171ecc237a4e05413acdc351bacddc70c8667b881fd3aa7a76R125

Looks like the targeting aid was never enabled (condition is always false -> don't ever display it). I should definitely add it as an additional switch then. I'll of course improve description too!

Spikeone commented 2 years ago

Okay, that intrigued me. I took a look and found exact moment where Military Aid was added to github repo and found this:

Wow, great find, and my memory is working fine :D

tehKaiN commented 2 years ago

Done! Now we need a programmer to do the review and merge in translations so that I can finalize PR.

obraz