FreeOrion

Forums for the FreeOrion project
It is currently Sun Dec 17, 2017 4:21 am

All times are UTC


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.



Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Wed Sep 21, 2016 2:06 am 
Offline
Space Kraken

Joined: Mon Nov 16, 2015 5:57 am
Posts: 105
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 ?


Top
 Profile  
 
PostPosted: Wed Sep 21, 2016 12:42 pm 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3295
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.

_________________
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.


Top
 Profile  
 
PostPosted: Wed Sep 21, 2016 1:02 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12045
Location: Munich
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.


Top
 Profile  
 
PostPosted: Thu Sep 22, 2016 7:40 pm 
Offline
Space Kraken

Joined: Mon Nov 16, 2015 5:57 am
Posts: 105
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.

Top
 Profile  
 
PostPosted: Thu Sep 22, 2016 7:48 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12045
Location: Munich
Not without C++ code edits.

With them, edit name copying to not require full visibility:

https://github.com/freeorion/freeorion/ ... t.cpp#L117


Top
 Profile  
 
PostPosted: Thu Sep 22, 2016 8:09 pm 
Offline
Space Kraken

Joined: Mon Nov 16, 2015 5:57 am
Posts: 105
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.


Top
 Profile  
 
PostPosted: Sun Oct 02, 2016 4:59 am 
Offline
Space Kraken

Joined: Mon Nov 16, 2015 5:57 am
Posts: 105
Ok so im going to build with the code for that.

from
Code:
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:
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 ?


Top
 Profile  
 
PostPosted: Sun Oct 02, 2016 6:04 am 
Offline
Creative Contributor
User avatar

Joined: Fri Jun 28, 2013 11:45 pm
Posts: 3295
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.

_________________
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.


Top
 Profile  
 
PostPosted: Sun Oct 02, 2016 6:56 am 
Offline
Space Kraken

Joined: Mon Nov 16, 2015 5:57 am
Posts: 105
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.


Top
 Profile  
 
PostPosted: Tue Oct 04, 2016 1:14 pm 
Offline
Vacuum Dragon
User avatar

Joined: Sun Sep 25, 2011 2:51 pm
Posts: 500
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.

_________________
[...] 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


Top
 Profile  
 
PostPosted: Tue Oct 04, 2016 1:19 pm 
Offline
Programming, Design, Admin
User avatar

Joined: Wed Oct 08, 2003 1:33 am
Posts: 12045
Location: Munich
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:


Attachments:
File comment: objects list with ID column visible
Objects_list.png
Objects_list.png [ 79.81 KiB | Viewed 206 times ]
Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group