Page 1 of 1
Why doesn't the ai give its ships names ?
Posted: Wed Sep 21, 2016 2:06 am
by xlightwavex
I just realized in the test build the ai isn't giving its ships names they are all named after the ship design. Is their a quick fix for that ?
Re: Why doesn't the ai give its ships names ?
Posted: Wed Sep 21, 2016 12:42 pm
by MatGB
All ships are actually named, but enemy owned ships have their names replaced in the client display (in a similar way to all "Deep Space" systems actually having a name that isn't displayed)
I don't know why this decision was taken and I would prefer it if ships did have names displayed, but I never got around to ask.
Re: Why doesn't the ai give its ships names ?
Posted: Wed Sep 21, 2016 1:02 pm
by Geoff the Medio
The idea is that if a player names a fleet or ship in order to help them remember what they are planning to do with them, they don't need to worry about this tipping off other players about their intentions.
Re: Why doesn't the ai give its ships names ?
Posted: Thu Sep 22, 2016 7:40 pm
by xlightwavex
Is there a way i can flip this behavior back off temporarily, while testing it's making tracking which ai ship is effected by what difficult when not in battle for my particular tests.
Re: Why doesn't the ai give its ships names ?
Posted: Thu Sep 22, 2016 7:48 pm
by Geoff the Medio
Not without C++ code edits.
With them, edit name copying to not require full visibility:
https://github.com/freeorion/freeorion/ ... t.cpp#L117
Re: Why doesn't the ai give its ships names ?
Posted: Thu Sep 22, 2016 8:09 pm
by xlightwavex
Geoff the Medio wrote:The idea is that if a player names a fleet or ship in order to help them remember what they are planning to do with them, they don't need to worry about this tipping off other players about their intentions.
It's sort of strange for the ai though, shouldn't it just use one of the names in the ship names list for display. I see like fleet rock... ship rock...
Maybe you could have two names per ship to say a ship could have a ...
"self_displayed_ship_name" to display to the player who owns the ship
then a
"enemy_displayed_ship_name" that you see for other players or ai's that just picks a name from the names lists in the en.txt files on creation randomly or by species or something and never changes.
Basically just a extra short name label for ai or players that gets assigned automatically on creation of the ship. but if you own the ship you see the real name.
Anyways i don't think im wanting to build the code for that it'll throw me off track while learning the scripting.
Re: Why doesn't the ai give its ships names ?
Posted: Sun Oct 02, 2016 4:59 am
by xlightwavex
Ok so im going to build with the code for that.
from
Code: Select all
if (vis >= VIS_PARTIAL_VISIBILITY) {
this->m_owner_empire_id = copied_object->m_owner_empire_id;
this->m_created_on_turn = copied_object->m_created_on_turn;
if (vis >= VIS_FULL_VISIBILITY) {
this->m_name = copied_object->m_name;
}
}
to
Code: Select all
if (vis >= VIS_PARTIAL_VISIBILITY) {
this->m_owner_empire_id = copied_object->m_owner_empire_id;
this->m_created_on_turn = copied_object->m_created_on_turn;
this->m_name = copied_object->m_name;
if (vis >= VIS_FULL_VISIBILITY) {
}
}
Is that right ?
Anything else i need to change ?
Re: Why doesn't the ai give its ships names ?
Posted: Sun Oct 02, 2016 6:04 am
by MatGB
Geoff the Medio wrote:The idea is that if a player names a fleet or ship in order to help them remember what they are planning to do with them, they don't need to worry about this tipping off other players about their intentions.
I'm 100% on board with this for fleet names.
But not for ship names, famous naval battles and important SF/space opera battles have names ships and rivalries, etc. It adds flavour.
If players want to name ships (I never do, the random defaults are fine) then that's up to them, it'd be kinda nice if they did display for that purpose: "doom ship #1" or "planet killer", etc would add a different type of flavour.
Re: Why doesn't the ai give its ships names ?
Posted: Sun Oct 02, 2016 6:56 am
by xlightwavex
MatGB wrote:Geoff the Medio wrote:The idea is that if a player names a fleet or ship in order to help them remember what they are planning to do with them, they don't need to worry about this tipping off other players about their intentions.
I'm 100% on board with this for fleet names.
But not for ship names, famous naval battles and important SF/space opera battles have names ships and rivalries, etc. It adds flavour.
If players want to name ships (I never do, the random defaults are fine) then that's up to them, it'd be kinda nice if they did display for that purpose: "doom ship #1" or "planet killer", etc would add a different type of flavour.
My first point is only for testing, i need to see the ai's actual ship name or a unique identifier.
Second point is that in actual play your don't really need to see what the player actually named his ship to see some random ship name that could be generated into a extra displayed name field.
You may however or in this case 'i do', need to designate a separate target id for the ships that are being affected by the script to compare with the sitrep, don't really care if that means all the ai or enemy players ships names are "bob" as long as i can tell "bob #1" from "bob #2" when my planetary gun in this case takes a pot shot at them so i can check if that ship took actual damage.
So my suggestion was that each ship be given a outward name (like a extra target name designation) from the list of names in the encyclopedia, that can be quick toggled or selected from either a button to see it, or the main menu options as well as given in sitreps that other people can see that also do not give away any secrets but can be used to track what is were.
In that manner both problems are addressed and solved.
That code didn't work btw and it took like 2 hours to compile
acckkk.
Re: Why doesn't the ai give its ships names ?
Posted: Tue Oct 04, 2016 1:14 pm
by em3
Do game objects have some internal ID? It could be exposed in UI (possibly with an option) for script debugging purposes. Either display it alongside the name or instead of it.
Re: Why doesn't the ai give its ships names ?
Posted: Tue Oct 04, 2016 1:19 pm
by Geoff the Medio
em3 wrote:Do game objects have some internal ID? It could be exposed in UI (possibly with an option) for script debugging purposes. Either display it alongside the name or instead of it.
Yes, as indicated by the objects list "ID" column: