[LIB] Library: Find Voice ID
Moderators: Scripting / Modding Moderators, Moderators for English X Forum
[LIB] Library: Find Voice ID
Put a sector, ware or object in, get the speech ID out.
Have your script speak that number on the proper page (sectors are on page 7, most other things on 17) and you get...
"Argon Prime"
"Nova"
"Asteroid"
"Cargo Life Support System"
"Federal Argon Shipyard"
etc.
Ship names are abbreviated. A Caiman Super Freighter is spoken as "Caiman".
Returns 0 if none could be found.
[ external image ] (ZIP) Terran Conflict Version
[ external image ] (ZIP) Reunion Version
Have your script speak that number on the proper page (sectors are on page 7, most other things on 17) and you get...
"Argon Prime"
"Nova"
"Asteroid"
"Cargo Life Support System"
"Federal Argon Shipyard"
etc.
Ship names are abbreviated. A Caiman Super Freighter is spoken as "Caiman".
Returns 0 if none could be found.
[ external image ] (ZIP) Terran Conflict Version
[ external image ] (ZIP) Reunion Version
Last edited by Gazz on Thu, 13. Nov 08, 15:16, edited 2 times in total.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
Code: Select all
236 @ $voice = [THIS] -> call script 'lib.gz.find.voice.ID' : Sector=$inv.sec.b Ship or Station=$anull Ware or other object=$anull
237 write to player logbook $voice
238 = speak text: page=17 id=$voice priority=5

LV's TC Scripts
Readme's For All My Scripts
I felt a great disturbance in the forum, Like millions of voices cried out in terror, then were silenced
si tacuisses, philosophus mansisses
Readme's For All My Scripts
I felt a great disturbance in the forum, Like millions of voices cried out in terror, then were silenced
si tacuisses, philosophus mansisses
That's because the sector names and speech are not on page 17. Read the first post. =P
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
LV knocks gazz across the forum with cycrow's lifeless torso
i tried 13 ladies

i tried 13 ladies


LV's TC Scripts
Readme's For All My Scripts
I felt a great disturbance in the forum, Like millions of voices cried out in terror, then were silenced
si tacuisses, philosophus mansisses
Readme's For All My Scripts
I felt a great disturbance in the forum, Like millions of voices cried out in terror, then were silenced
si tacuisses, philosophus mansisses
The ability to see or hear is insignificant next to the power of the Force.
PS: Seven shall be the number of thy counting and the number of thy counting shall be seven.
Eight shalt thou not count, neither shalt thou count six, excepting that thou then proceedeth to seven. Nine is right out.
Once the number seven, being the number of thy counting, be reached, then speaketh Betty the name of thy sector.
PS: Seven shall be the number of thy counting and the number of thy counting shall be seven.
Eight shalt thou not count, neither shalt thou count six, excepting that thou then proceedeth to seven. Nine is right out.
Once the number seven, being the number of thy counting, be reached, then speaketh Betty the name of thy sector.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
ok, test passed, you are still ok to advise the peasants of the forum in coding related matters.
Tis was a simple number error i chose to test you both with
Tis was a simple number error i chose to test you both with

LV's TC Scripts
Readme's For All My Scripts
I felt a great disturbance in the forum, Like millions of voices cried out in terror, then were silenced
si tacuisses, philosophus mansisses
Readme's For All My Scripts
I felt a great disturbance in the forum, Like millions of voices cried out in terror, then were silenced
si tacuisses, philosophus mansisses
2 questions
1. If it try's one of my renamed sectors no audio so i assume i need to force it to say something (e.g specify UK sector index)
2. Where are the race sounds so i can get it to say argon titan not just titan
I appear to be turning blonde
1. If it try's one of my renamed sectors no audio so i assume i need to force it to say something (e.g specify UK sector index)
2. Where are the race sounds so i can get it to say argon titan not just titan
I appear to be turning blonde

LV's TC Scripts
Readme's For All My Scripts
I felt a great disturbance in the forum, Like millions of voices cried out in terror, then were silenced
si tacuisses, philosophus mansisses
Readme's For All My Scripts
I felt a great disturbance in the forum, Like millions of voices cried out in terror, then were silenced
si tacuisses, philosophus mansisses
The script searches 440001 for the sector name because for normal ES sectors the text ID and speech ID are identical.
If you want speech for your custom sectors you have to make sure they match.
The script does not check an infinite number range, though.
If your custom sectors do have a matching speech on the same ID, maybe it's outside the loop range of the script.
If you want speech for your custom sectors you have to make sure they match.
The script does not check an infinite number range, though.
If your custom sectors do have a matching speech on the same ID, maybe it's outside the loop range of the script.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
you do know that the sector ids are based on thier coordinates, so you can generate the voice id for sectors without ever needing to read anything from the text files.
my Satalite Early Warning Network does that.
i create a library for it, lib.cycrow.getsound
my Satalite Early Warning Network does that.
i create a library for it, lib.cycrow.getsound
Code: Select all
001 $x = $sector -> get universe x index
002 $y = $sector -> get universe y index
003 inc $x =
004 inc $y =
005
006 if $x < 10
007 $x = sprintf: fmt='0%s', $x, null, null, null, null
008 else
009 $x = sprintf: fmt='%s', $x, null, null, null, null
010 end
011 if $y < 10
012 $y = sprintf: fmt='0%s', $y, null, null, null, null
013 else
014 $y = sprintf: fmt='%s', $y, null, null, null, null
015 end
016 $sound.num = sprintf: fmt='102%s%s', $y, $x, null, null, null
017 $sound.num = string $sound.num to integer
018 return $sound.num
I only remembered that there was... something I forgot.Cycrow wrote:you do know that the sector ids are based on thier coordinates, so you can generate the voice id for sectors without ever needing to read anything from the text files.
Is that system enforced by the engine so it always has to work or could mods arbitrary assign voice IDs to a sector?
Of course it would be far quicker than a string match but with all the mods and freaky workarounds out there I don't automatically trust every modder to do things "the right way". =)
BTW: why "Satalite Early Warning Network"
Is that polish or italian for Satellite?
Version 3 released.
Voice IDs were not reported properly for some factories.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
the voices are hardcoded to those ids, so modders cant change them aroundGazz wrote:I only remembered that there was... something I forgot.
Is that system enforced by the engine so it always has to work or could mods arbitrary assign voice IDs to a sector?

adding new sectors, means adding the text at the correct id to match that system
Of course it would be far quicker than a string match but with all the mods and freaky workarounds out there I don't automatically trust every modder to do things "the right way". =)
basically coz im dyslexic and cant spellGazz wrote: BTW: why "Satalite Early Warning Network"
Is that polish or italian for Satellite?
Go ahead.
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
There is no sense crying over every mistake. You just keep on trying till you run out of cake.