Why doesn't the ai give its ships names ?
Moderator: Oberlus
Forum rules
Always mention the exact version of FreeOrion you are testing.
When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
Always mention the exact version of FreeOrion you are testing.
When reporting an issue regarding the AI, if possible provide the relevant AI log file and a save game file that demonstrates the issue.
-
- Space Kraken
- Posts: 111
- Joined: Mon Nov 16, 2015 5:57 am
Why doesn't the ai give its ships names ?
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 ?
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.
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.
Mat Bowles
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Why doesn't the ai give its ships names ?
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.
-
- Space Kraken
- Posts: 111
- Joined: Mon Nov 16, 2015 5:57 am
Re: Why doesn't the ai give its ships names ?
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.
Last edited by xlightwavex on Thu Sep 22, 2016 7:57 pm, edited 1 time in total.
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Why doesn't the ai give its ships names ?
Not without C++ code edits.
With them, edit name copying to not require full visibility:
https://github.com/freeorion/freeorion/ ... t.cpp#L117
With them, edit name copying to not require full visibility:
https://github.com/freeorion/freeorion/ ... t.cpp#L117
-
- Space Kraken
- Posts: 111
- Joined: Mon Nov 16, 2015 5:57 am
Re: Why doesn't the ai give its ships names ?
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...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.
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.
-
- Space Kraken
- Posts: 111
- Joined: Mon Nov 16, 2015 5:57 am
Re: Why doesn't the ai give its ships names ?
Ok so im going to build with the code for that.
from
to
Is that right ?
Anything else i need to change ?
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;
}
}
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) {
}
}
Anything else i need to change ?
Re: Why doesn't the ai give its ships names ?
I'm 100% on board with this for fleet names.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.
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.
Mat Bowles
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.
-
- Space Kraken
- Posts: 111
- Joined: Mon Nov 16, 2015 5:57 am
Re: Why doesn't the ai give its ships names ?
My first point is only for testing, i need to see the ai's actual ship name or a unique identifier.MatGB wrote:I'm 100% on board with this for fleet names.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.
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.
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 ?
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.
https://github.com/mmoderau
[...] for Man has earned his right to hold this planet against all comers, by virtue of occasionally producing someone totally batshit insane. - Randall Munroe, title text to xkcd #556
[...] for Man has earned his right to hold this planet against all comers, by virtue of occasionally producing someone totally batshit insane. - Randall Munroe, title text to xkcd #556
- Geoff the Medio
- Programming, Design, Admin
- Posts: 13587
- Joined: Wed Oct 08, 2003 1:33 am
- Location: Munich
Re: Why doesn't the ai give its ships names ?
Yes, as indicated by the objects list "ID" column: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.
- Attachments
-
- objects list with ID column visible
- Objects_list.png (79.81 KiB) Viewed 885 times