Skip to content

Conversation

@ivan-mogilko
Copy link
Contributor

@ivan-mogilko ivan-mogilko commented Aug 30, 2025

There's a long time issue that the properties that tell "script name" and "human text name" are called differently in the Editor and in the script.

In the old Editor the settings were labelled "Name" and "Script O-Name" (maybe it means "object name", as in OOP).
In the new Editor they got different labels: "Description" for a human name, and "Name" for the script name.
But the script commands stayed the same.

This is an endless source of confusion for beginners, and maybe not only beginners (for example, see recent #2823.

This PR assigns consistent labels to "script name" and "description" kind of properties in all the game entities in the Editor. This also makes them consistent with how they are called in script api. Only labels of properties are changed, leaving property identifying names as they are, so there should not be any compatibility issues and the project data format is not changed. The effect is purely in how the users will see these properties are called in the editor panel.

This assigns consistent labels to "script name" and "description" kind of properties in all the game entities. This also makes them consistent with how they are called in script api.
Only DisplayName of properties are changed, leaving property names as they are, so there should not be any compatibility issues and data format is not changed.
The effect is purely in how the users will see these properties are called in the editor panel.
@ericoporto
Copy link
Member

ericoporto commented Aug 31, 2025

I don't know if it needs any change, but thought to mention... Audio Clips have a GetByName (which suggests... Name) and a property ScriptName. Should they also be updated to read ScriptName?

ags/Engine/ac/audioclip.cpp

Lines 179 to 189 in 9981bd4

{ "AudioClip::GetByName", API_FN_PAIR(AudioClip_GetByName) },
{ "AudioClip::Play^2", API_FN_PAIR(AudioClip_Play) },
{ "AudioClip::PlayFrom^3", API_FN_PAIR(AudioClip_PlayFrom) },
{ "AudioClip::PlayQueued^2", API_FN_PAIR(AudioClip_PlayQueued) },
{ "AudioClip::PlayOnChannel^3", API_FN_PAIR(AudioClip_PlayOnChannel) },
{ "AudioClip::Stop^0", API_FN_PAIR(AudioClip_Stop) },
{ "AudioClip::get_ID", API_FN_PAIR(AudioClip_GetID) },
{ "AudioClip::get_FileType", API_FN_PAIR(AudioClip_GetFileType) },
{ "AudioClip::get_IsAvailable", API_FN_PAIR(AudioClip_GetIsAvailable) },
{ "AudioClip::get_ScriptName", API_FN_PAIR(AudioClip_GetScriptName) },
{ "AudioClip::get_Type", API_FN_PAIR(AudioClip_GetType) },

Edit: actually it appears everything got a GetByName added which will make things more confusing if the Name now gets renamed as ScriptName. Shouldn't the "Name" be kept as "Description" to avoid confusion?

@ivan-mogilko
Copy link
Contributor Author

ivan-mogilko commented Aug 31, 2025

actually it appears everything got a GetByName added which will make things more confusing if the Name now gets renamed as ScriptName,

It's already ScriptName in script, and this difference existed before.

They both were added in this PR:
#2011

Somehow nobody mentioned that it's bad.

Renaming to "GetByScriptName", if desired, would require to add an alias, and keep old function name for backwards compatibility, maybe under the script api switch.

@ericoporto
Copy link
Member

Somehow nobody mentioned that it's bad.

I never thought about it, I guess I was used and didn't see that this difference between the Editor properties and Script API could cause confusion for someone newly arrived. I got the difference and then moved on with making games...

@ivan-mogilko ivan-mogilko marked this pull request as draft September 4, 2025 07:52
@ivan-mogilko
Copy link
Contributor Author

I will wait a little and think more about this.
Also, maybe it would be a better idea to do any similar changes in AGS 4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

context: ui/ux what: editor related to the game editor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants