Assistance Requested

Freeform discussion about anything related to modding Transcendence.
Post Reply
User avatar
Darth Saber
Militia Commander
Militia Commander
Posts: 290
Joined: Mon Aug 04, 2008 4:53 pm
Location: Korriban

I have been working on a project which deals with the both creation of an iPod, and of 'modules' containing a song which can be loaded into it. However, I have run into some problems:

1. the module loads the song, but the sound level cannot be controlled using Transcendence's built in volume control (F7 and F8). What ever level the sound is at when the module is initialized, that is the level it stays at.

2. the song will not stop; literally; even if the player is uninstalled, the song will continue to play. If you exit to the main screen, the song will continue to play; the only way to get it to stop is to exit Transcendence.

3. I am not very good at scripting; this said, I need someone to tutor me on how to create a script which would enable the ipod to have selectable volume controls and 'stop' button displayed as options below the usable item menu on the primary display. Imagine using a shield in which you press the 'u' key, select the shield, and see a list of options like 'press 1 for laser; press 2 for kinetic, -etc.

These are the problems which I need help with at the moment. Any assistance would be greatly appreciated.
User avatar
Darth Saber
Militia Commander
Militia Commander
Posts: 290
Joined: Mon Aug 04, 2008 4:53 pm
Location: Korriban

Here is a copy of the xml for both the ipod and the module:

<ItemType UNID= "&itAei;"
name= "ancient Earth iPod"
level= "4"
value= "1200"
mass= "1"
frequency= "uncommon"
numberAppearig= "1"
modifiers= "MajorItem; Aei"

description= "Commonly found during Earth's 20th century, this 'iPod' was used to playback audio files, which can be loaded via a module slot."
>
sortName= "iPod"

<Image imageID="&rsAei;" imageX="0" imageY="0" imageWidth="48" imageHeight="48"/>

<MiscellaneousDevice
powerUse= "20"
/>
<Invoke>
(intAutoInstall gSource gItem)
</Invoke>

</ItemType>


<ItemType UNID= "&itTSmem;"
name= "TS module"
level= "6"
value= "1000"
mass= "50"
frequency= "uncommon"
modifiers= "Consumable; Info; Aei"

description= "This module contains an audio recording."
>
sortName= "iPod module"
<Image imageID="&rsTSmem;" imageX="0" imageY="0" imageWidth="100" imageHeight="75"/>

<Invoke>
(switch
; If we don't have an iPod
(not (objGetItems gSource "*I+Aei"))
(objSendMessage gSource Nil "iPod required.")

; Otherwise, we play the audio file
(block (randsound)
(setq randsound (random 0 1))
(switch
(eq randsound 0)
(block (Nil)
(plyMessage gplayer "audio file")
(sysCreateWeaponFire &virtual1; gSource (objGetPos gSource ) 0 0 Nil True)
)
(eq randsound 1)
(block (Nil)
(plyMessage gplayer "audio file")
(sysCreateWeaponFire &virtual1; gSource (objGetPos gSource ) 0 0 Nil True)
)
)))
</Invoke>

</ItemType>

<!-- Virtual audio1 -->

<ItemType UNID="&virtual1;"
name= "virtual1"
virtual= "true"
level= "5"
>

<Weapon
type= "missile"
damage= "kinetic:0"
>

<Fragment
count= "1"
type= "radius"
damage= "kinetic:0"
>
<Effect>
<Image imageID="&rsMediumExplosions;"
imageX="0"
imageY="0"
imageWidth="0"
imageHeight="0"
/>
</Effect>
</Fragment>

<HitEffect
sound="&snTSW;"
>

<Image imageID="&rsMediumExplosions;"
imageX="0"
imageY="0"
imageWidth="0"
imageHeight="0"
/>

</HitEffect>

</Weapon>

</ItemType>
Please note that these xml are separate from one another. The ipod was designed to be like the Neuros personal media player. The codes and ideas used in their instruction were borrowed from several mods and resources most notably the "Scramble Algorithm" for the 'module,' and the "Neuros personal media player," an older mod from the original Xelerus site prior to its two site adjustments. I will be explaining more about that after the mod has been completed, in my 'credits.txt' file.
Post Reply