Author Topic: [LD] Combat Animation  (Read 2055 times)

Offline Void

[LD] Combat Animation
« on: June 06, 2016, 04:55:27 pm »
As the topic shows, where is it being stored?

I want to speed up some of the projectile speed but can't find it in all this clutter. Any help would be appreciated.
The only way to truly hurt a man, is to take everything that he valued and degrade it and remind him of it everyday of his life. But by doing this, you also create a monster, and you will regret ever harming that man, because he will be your greatest horror.

Offline The Bigfoot

Re: [LD] Combat Animation
« Reply #1 on: June 06, 2016, 06:15:04 pm »
Everything based in the battle screen, is located in battle_screen in screens custom.rpy. You could change the transform so you wouldent need to change the battle screen

Code: (Line 643 in screens custom.rpy) [Select]
                    $wait = 0
                    for a in range(bullet.shot_count):
                        $x_fudging = renpy.random.randint(-25,25)
                        $y_fudging = renpy.random.randint(-20,20)
                        $wait += 0.02
                       
                        $ travel_time = get_ship_distance(bullet.parent,bullet.target)*0.2
                        add bullet.lbl:
                            at move_bullet(xposition,yposition,next_xposition+x_fudging,next_yposition+y_fudging,travel_time,wait)
                            xanchor 0.5
                            yanchor 0.5
                            zoom (zoomlevel/3.0)
I make spaceships! - http://innomenpro.com/forums/index.php?topic=1366.0
Massive Modding tutorial here: http://innomenpro.com/forums/index.php?topic=1251.0
New Award: John Titor [Sep 17, 2015, 10:16:07 PM]:   BigFoot is the official Evil Genius fro mteh forum

Offline Void

Re: [LD] Combat Animation
« Reply #2 on: June 06, 2016, 09:13:59 pm »
Everything based in the battle screen, is located in battle_screen in screens custom.rpy. You could change the transform so you wouldent need to change the battle screen

Code: (Line 643 in screens custom.rpy) [Select]
                    $wait = 0
                    for a in range(bullet.shot_count):
                        $x_fudging = renpy.random.randint(-25,25)
                        $y_fudging = renpy.random.randint(-20,20)
                        $wait += 0.02
                       
                        $ travel_time = get_ship_distance(bullet.parent,bullet.target)*0.2
                        add bullet.lbl:
                            at move_bullet(xposition,yposition,next_xposition+x_fudging,next_yposition+y_fudging,travel_time,wait)
                            xanchor 0.5
                            yanchor 0.5
                            zoom (zoomlevel/3.0)

Okay... so which among these controls projectile speed & which ones control the interval between shots?

Also, can you list me which ones are for kinetic cannons, which ones for pulse, & which ones for assault & in which lines?

Updated: June 06, 2016, 09:53:57 pm
Oooh nevermind I found out how to separate them.

Updated: June 06, 2016, 09:55:23 pm
Now... the next order on the list is...

Where are the codes associated with the sound effects of each attack?

I want to use the shotgun sound of Bianca's shotgun instead of the standard one for all kinetic weapons, how to I do that?

Same applies for Sola's sniper fire.
« Last Edit: June 06, 2016, 10:01:16 pm by Void »
The only way to truly hurt a man, is to take everything that he valued and degrade it and remind him of it everyday of his life. But by doing this, you also create a monster, and you will regret ever harming that man, because he will be your greatest horror.

Offline The Bigfoot

Re: [LD] Combat Animation
« Reply #3 on: June 07, 2016, 08:25:09 am »
They use the same sound atm in LD, but the sound is set in the weapon.fire attribute, for kinetics that is L2845 in classes, just before it sets BM.shooting

Code: (Classes.rpy Line 2873) [Select]
            if self.fire_sound is None:
                if self.wtype == "Kinetic":
                    self.fire_sound = 'sound/railgun.ogg'
                else:
                    self.fire_sound = 'sound/Flak.ogg'
I make spaceships! - http://innomenpro.com/forums/index.php?topic=1366.0
Massive Modding tutorial here: http://innomenpro.com/forums/index.php?topic=1251.0
New Award: John Titor [Sep 17, 2015, 10:16:07 PM]:   BigFoot is the official Evil Genius fro mteh forum

Offline Void

Re: [LD] Combat Animation
« Reply #4 on: June 07, 2016, 09:57:15 am »
They use the same sound atm in LD, but the sound is set in the weapon.fire attribute, for kinetics that is L2845 in classes, just before it sets BM.shooting

Code: (Classes.rpy Line 2873) [Select]
            if self.fire_sound is None:
                if self.wtype == "Kinetic":
                    self.fire_sound = 'sound/railgun.ogg'
                else:
                    self.fire_sound = 'sound/Flak.ogg'

Aah, okay. But how do I assign specific sounds for battleship spinal cannons, Sola's sniper rifle, & Bianca's shotgun?

Also, is there a way to assign the Vanguard's firing animation to another ship like say, the Ceran Battleships? If so, how?
The only way to truly hurt a man, is to take everything that he valued and degrade it and remind him of it everyday of his life. But by doing this, you also create a monster, and you will regret ever harming that man, because he will be your greatest horror.

Offline The Bigfoot

Re: [LD] Combat Animation
« Reply #5 on: June 07, 2016, 11:59:34 am »
I did make it possible to reassign the vanguard animation in some MoA code for the legion in LD, but I dont know if it was integrated in the newest update to LD.

For the weapon sounds if you try something like...

Code: [Select]
init 15 python:
    for ship in storeships:
        ship.fire_sounds = {"Kineticweaponname":'sound/raingun.ogg', "Assaultweaponname":'sound/Flak.ogg'} # and such for the weapons you want to alter

and in the weapon.fire code change:

Code: [Select]
            if self.fire_sound is None:
                if self.wtype == "Kinetic":
                    self.fire_sound = 'sound/railgun.ogg'
                else:
                    self.fire_sound = 'sound/Flak.ogg'

to

Code: [Select]
            if self.fire_sound is None:
                try:
                    self.fire_sound = BM.attacker.fire_sounds[parent.name]
                except:
                    if self.wtype == "Kinetic":
                        self.fire_sound = 'sound/railgun.ogg'
                    else:
                        self.fire_sound = 'sound/Flak.ogg'

storeships is a list of ship classes that is auto-generated at init 10 to include any mod ships especially for mods that do things like this and reduce compatibility issues. It will automagically adjust for existing ships so long as the attribute on the ships is not directly altered outside of init.

After init 15 you can then adjust the ship.fire_sounds and it would check the attacking weapon's name then search the dictionary for the associated sound and set fire_sound, if not found it goes to default

for the vanguard, check if BM.actor exists. If it does then setting it to a ship will cause the vanguard animation to fire from that ship instead, but set it back to sunrider after its fired or it will be buggy. If not, let me know and I will send you the code.

I havent tested the code, not at PC atm but any problems should be fairly easy to fix
I make spaceships! - http://innomenpro.com/forums/index.php?topic=1366.0
Massive Modding tutorial here: http://innomenpro.com/forums/index.php?topic=1251.0
New Award: John Titor [Sep 17, 2015, 10:16:07 PM]:   BigFoot is the official Evil Genius fro mteh forum

Offline Void

Re: [LD] Combat Animation
« Reply #6 on: June 07, 2016, 12:39:07 pm »
I did make it possible to reassign the vanguard animation in some MoA code for the legion in LD, but I dont know if it was integrated in the newest update to LD.

For the weapon sounds if you try something like...

Code: [Select]
init 15 python:
    for ship in storeships:
        ship.fire_sounds = {"Kineticweaponname":'sound/raingun.ogg', "Assaultweaponname":'sound/Flak.ogg'} # and such for the weapons you want to alter

and in the weapon.fire code change:

Code: [Select]
            if self.fire_sound is None:
                if self.wtype == "Kinetic":
                    self.fire_sound = 'sound/railgun.ogg'
                else:
                    self.fire_sound = 'sound/Flak.ogg'

to

Code: [Select]
            if self.fire_sound is None:
                try:
                    self.fire_sound = BM.attacker.fire_sounds[parent.name]
                except:
                    if self.wtype == "Kinetic":
                        self.fire_sound = 'sound/railgun.ogg'
                    else:
                        self.fire_sound = 'sound/Flak.ogg'

storeships is a list of ship classes that is auto-generated at init 10 to include any mod ships especially for mods that do things like this and reduce compatibility issues. It will automagically adjust for existing ships so long as the attribute on the ships is not directly altered outside of init.

After init 15 you can then adjust the ship.fire_sounds and it would check the attacking weapon's name then search the dictionary for the associated sound and set fire_sound, if not found it goes to default

for the vanguard, check if BM.actor exists. If it does then setting it to a ship will cause the vanguard animation to fire from that ship instead, but set it back to sunrider after its fired or it will be buggy. If not, let me know and I will send you the code.

I havent tested the code, not at PC atm but any problems should be fairly easy to fix

I'm sorry but I have absolutely no idea what to do with these codes, where to put them, how to use them, nor do I know how to assign Seraphim's Rifle & Bianca's Shotgun sound effects using this.

Where do I put the name & thingies & all that? I'm not a code expert so what your just said to me just flew over my head.

Earlier I managed to mess with my own way & managed to get them to work. But there's one huge problem: Since I assign the weapon types to 'Rifle', 'Shotgun', & 'Cannon', the upgrades that covers kinetic damage & accuracy seem to no longer affect them, not only that, their damage is written as 0 but they still deal damage.

I reverted them to how they were so that fixed the problem, but now I don't know what else to do.

I found where the bullet sprites are & want to change Bianca's shotgun with the assault bullet sprite instead of the kinetic one. Also managed to do it earlier but since that one is messed up I also reverted that.

Updated: June 07, 2016, 12:46:02 pm
Oh wait, that upgrade thingy seems to have something to do with the upgrade files.

Code: [Select]
    for weapon in ship.weapons:
        if weapon.wtype == 'Kinetic' or weapon.wtype == 'Assault':
            $ uses_kinetics = True

Is this it?

Or maybe this?

Code: [Select]
    for weapon in ship.weapons:
        if weapon.wtype == "Kinetic":
            $stats_kinetic = [ str(get_modified_weapon_damage(weapon))+'x'+str(weapon.shot_count)+'='+str(get_modified_weapon_damage(weapon)*weapon.shot_count),str(get_modified_accuracy(weapon)),str(weapon.energy_cost(ship)) ]
        elif weapon.wtype == "Assault":
            $stats_assault = [ str(get_modified_weapon_damage(weapon))+'x'+str(weapon.shot_count)+'='+str(get_modified_weapon_damage(weapon)*weapon.shot_count),str(get_modified_accuracy(weapon)),str(weapon.energy_cost(ship)) ]
        elif weapon.wtype == "Laser":
            $stats_laser = [ str(get_modified_weapon_damage(weapon))+'x'+str(weapon.shot_count)+'='+str(get_modified_weapon_damage(weapon)*weapon.shot_count),str(get_modified_accuracy(weapon)),str(weapon.energy_cost(ship)) ]
        elif weapon.wtype == "Pulse":
            $stats_pulse = [ str(get_modified_weapon_damage(weapon))+'x'+str(weapon.shot_count)+'='+str(get_modified_weapon_damage(weapon)*weapon.shot_count),str(get_modified_accuracy(weapon)),str(weapon.energy_cost(ship)) ]
        elif weapon.wtype == "Missile":
            $stats_missile = [ str(get_modified_weapon_damage(weapon))+'x'+str(weapon.shot_count)+'='+str(get_modified_weapon_damage(weapon)*weapon.shot_count)+' ('+str(BM.selected.max_missiles)+'max)',str(get_modified_accuracy(weapon)),str(weapon.energy_cost(ship)) ]
        elif weapon.wtype == "Rocket":
            $stats_torpedo = [ str(get_modified_weapon_damage(weapon))+'x'+str(weapon.shot_count)+'='+str(get_modified_weapon_damage(weapon)*weapon.shot_count)+' ('+str(BM.selected.max_rockets)+'max)',str(get_modified_accuracy(weapon)),str(weapon.energy_cost(ship)) ]
        elif weapon.wtype == "Melee":
            $stats_melee = [ str(get_modified_weapon_damage(weapon))+'x'+str(weapon.shot_count)+'='+str(get_modified_weapon_damage(weapon)*weapon.shot_count),str(get_modified_accuracy(weapon)),str(weapon.energy_cost(ship)) ]

If I use the weapon type in conjunction with this, do you think it'll work as an alternative?

I don't fully understand how these upgrade thing works.
« Last Edit: June 07, 2016, 12:46:02 pm by Void »
The only way to truly hurt a man, is to take everything that he valued and degrade it and remind him of it everyday of his life. But by doing this, you also create a monster, and you will regret ever harming that man, because he will be your greatest horror.

Offline The Bigfoot

Re: [LD] Combat Animation
« Reply #7 on: June 07, 2016, 01:17:15 pm »
The weapons are defined in library, Seraphim's weapon is SeraphimKinetic, thinking of it the weapons dont all have unique names, so its better to use its class name

if you just put this init code anywhere, it will give all ships an attribute fire_sounds set to a blank dictionary (eg Sunrider.fire_sounds = {})

Code: [Select]
init 15 python:
    for ship in storeships:
        ship.fire_sounds = {}

Then for a ship you want to set the unique weapon sound for:

Code: [Select]
init 16 python:
    ship.fire_sounds["Weapon Class Name"] = "Sound.ogg"
#example:
    #Seraphim.fire_sounds[SeraphimKinetic] = 'SoundYouWant.ogg'

Then replace:

Code: [Select]
            if self.fire_sound is None:
                if self.wtype == "Kinetic":
                    self.fire_sound = 'sound/railgun.ogg'
                else:
                    self.fire_sound = 'sound/Flak.ogg'

in kinetic.fire (in classes.rpy) with:

Code: [Select]
            if self.fire_sound is None:
                try:
                    self.fire_sound = BM.attacker.fire_sounds[parent.__class__]
                except:
                    if self.wtype == "Kinetic":
                        self.fire_sound = 'sound/railgun.ogg'
                    else:
                        self.fire_sound = 'sound/Flak.ogg'

This checks if BM.attacker.fire_sounds has the attacking weapons base class in it and if it does, then it stores that sound, otherwise it defaults to the standard one

Its broken down to:
When a kinetic weapon is fired: (weapon.fire is triggered, dealing damage, activateing functions and such. It now checks ship.fire_sounds for the weapon class.)
    if weapon class in attacker's fire_sounds:
        set sound to weapon's sound
    otherwise:
        use existing sound
   
I make spaceships! - http://innomenpro.com/forums/index.php?topic=1366.0
Massive Modding tutorial here: http://innomenpro.com/forums/index.php?topic=1251.0
New Award: John Titor [Sep 17, 2015, 10:16:07 PM]:   BigFoot is the official Evil Genius fro mteh forum

Offline Void

Re: [LD] Combat Animation
« Reply #8 on: June 07, 2016, 01:47:08 pm »
The weapons are defined in library, Seraphim's weapon is SeraphimKinetic, thinking of it the weapons dont all have unique names, so its better to use its class name

if you just put this init code anywhere, it will give all ships an attribute fire_sounds set to a blank dictionary (eg Sunrider.fire_sounds = {})

Code: [Select]
init 15 python:
    for ship in storeships:
        ship.fire_sounds = {}

Then for a ship you want to set the unique weapon sound for:

Code: [Select]
init 16 python:
    ship.fire_sounds["Weapon Class Name"] = "Sound.ogg"
#example:
    #Seraphim.fire_sounds[SeraphimKinetic] = 'SoundYouWant.ogg'

Then replace:

Code: [Select]
            if self.fire_sound is None:
                if self.wtype == "Kinetic":
                    self.fire_sound = 'sound/railgun.ogg'
                else:
                    self.fire_sound = 'sound/Flak.ogg'

in kinetic.fire (in classes.rpy) with:

Code: [Select]
            if self.fire_sound is None:
                try:
                    self.fire_sound = BM.attacker.fire_sounds[parent.__class__]
                except:
                    if self.wtype == "Kinetic":
                        self.fire_sound = 'sound/railgun.ogg'
                    else:
                        self.fire_sound = 'sound/Flak.ogg'

This checks if BM.attacker.fire_sounds has the attacking weapons base class in it and if it does, then it stores that sound, otherwise it defaults to the standard one

Its broken down to:
When a kinetic weapon is fired: (weapon.fire is triggered, dealing damage, activateing functions and such. It now checks ship.fire_sounds for the weapon class.)
    if weapon class in attacker's fire_sounds:
        set sound to weapon's sound
    otherwise:
        use existing sound
   

Oooh, so that's how it works. Let's see if I can try to get it to work.

Now, about shooting animations, how to make Bianca's & Sola's separate?

Hmm... where do I put the first 2 codes?

The init 15 & 16 thing?

Also, another question, I just want the firing animation of the new Vanguard bolt on the map for the Ceran Battleships, not the full animation of Sunrider.

Know any way to do this?

Updated: June 07, 2016, 01:56:32 pm
Oh yes, how to change Bianca's bullet sprites into the one where assault bullets are used instead of kinetics?

Updated: June 07, 2016, 02:07:42 pm
These are the codes that seems to monitor which weapon uses which.

Code: [Select]
    class BulletSprite(MissileSprite):
        def __init__(self,parent,target,weapon):
            MissileSprite.__init__(self,parent,target,weapon)
            if self.type == "Pulse":
                self.lbl = im.Rotozoom('Battle UI/pulse map.png',self.angle,2.0)
            elif self.type == "Kinetic":
                self.lbl = im.Rotozoom('Battle UI/kinetic_round map.png',self.angle,1.5)
            elif self.type == "Assault":
                self.lbl = im.Rotozoom('Battle UI/flakbullet map.png',self.angle,1.5)
            elif self.type == "Melee":
                self.lbl = im.Rotozoom('Battle UI/melee_map.png',self.angle-135,1.5)   

Problem is, Bianca's shotgun is categorized under 'Kinetics', how do I make it so that her shotgun uses the assault bullets instead?

Also, this here.

Code: [Select]
                elif bullet.type == 'Kinetic':
                    $wait = 0
                    for a in range(bullet.shot_count):
                        $x_fudging = renpy.random.randint(-25,25)
                        $y_fudging = renpy.random.randint(-20,20)
                       
                        $ travel_time = get_ship_distance(bullet.parent,bullet.target)*0.1
                        add bullet.lbl:
                            at move_bullet(xposition,yposition,next_xposition+x_fudging,next_yposition+y_fudging,travel_time,wait)
                            xanchor 0.5
                            yanchor 0.5
                            zoom (zoomlevel/3.0)
               
                elif bullet.type == 'Rifle':
                    $wait = 2.0
                    for a in range(bullet.shot_count):
                        $x_fudging = renpy.random.randint(-25,25)
                        $y_fudging = renpy.random.randint(-20,20)
                       
                        $ travel_time = get_ship_distance(bullet.parent,bullet.target)*0.02
                        add bullet.lbl:
                            at move_bullet(xposition,yposition,next_xposition+x_fudging,next_yposition+y_fudging,travel_time,wait)
                            xanchor 0.5
                            yanchor 0.5
                            zoom (zoomlevel/3.0)
               

See, the 2nd one is what I want for the Seraphim only, to there be a delay before the bullet fires. How do I do that?

I tried using the self.name but it didn't work at all.
« Last Edit: June 07, 2016, 02:09:15 pm by Void »
The only way to truly hurt a man, is to take everything that he valued and degrade it and remind him of it everyday of his life. But by doing this, you also create a monster, and you will regret ever harming that man, because he will be your greatest horror.

Offline The Bigfoot

Re: [LD] Combat Animation
« Reply #9 on: June 07, 2016, 02:22:15 pm »
Also in the fire function is...

BM.shooting = BulletSprite(parent,target,self) BM.shooting is used to hold the displayable for the battle screen

By changeing BulletSprite, we can change it for every weapon (bar laser and support)

Code: [Select]

init 15 python:
    for weapon in storeweps:
        weapon.bullet = None # give weapons the .bullet attribute

init 16 python:
    BiancaAssault.bullet = ["Battle UI/flakbullet map.png", 1.5] # Set the weapon image and rotation
    # Standard is Pulse = 2.0 Kinetic, assault and melee = 1.5, if useing custom images you might need to tweak this, so its not set in bulletsprite

init 5 python:
    class BulletSprite(MissileSprite):
        def __init__(self,parent,target,weapon):
            MissileSprite.__init__(self,parent,target,weapon)
            if weapon.bullet != None and self.type != "Laser": # If its got a custom image use that, otherwise do standard
                self.lbl = im.Rotozoom(weapon.bullet[0], self.angle,weapon.bullet[1])
            else:
                if self.type == "Pulse":
                    self.lbl = im.Rotozoom('Battle UI/pulse map.png',self.angle,2.0)
                elif self.type == "Kinetic":
                    self.lbl = im.Rotozoom('Battle UI/kinetic_round map.png',self.angle,1.5)
                elif self.type == "Assault":
                    self.lbl = im.Rotozoom('Battle UI/flakbullet map.png',self.angle,1.5)
                elif self.type == "Melee":
                    self.lbl = im.Rotozoom('Battle UI/melee_map.png',self.angle-135,1.5) 

Bulletsprite (the display object) will be overwritten so when its made, if the weapon.bullet attribute is set, then it will use that instead. Won't work for lasers because that's defined on the battle screen itself whilst other things are moved across it. Missiles use something slightly different, can look into that if you want when I get home tomorrow.

Just throw them anywhere. Again I havent tested the code as unfortunatly I'm on a train.

Edit:

Just saw the edits, BM.attacker is the ship that's attacking

Try
Code: [Select]
if BM.attacker == seraphim:

rather than bullet.type == rifle
« Last Edit: June 07, 2016, 02:26:36 pm by The Bigfoot »
I make spaceships! - http://innomenpro.com/forums/index.php?topic=1366.0
Massive Modding tutorial here: http://innomenpro.com/forums/index.php?topic=1251.0
New Award: John Titor [Sep 17, 2015, 10:16:07 PM]:   BigFoot is the official Evil Genius fro mteh forum

Offline Void

Re: [LD] Combat Animation
« Reply #10 on: June 07, 2016, 02:48:53 pm »
Also in the fire function is...

BM.shooting = BulletSprite(parent,target,self) BM.shooting is used to hold the displayable for the battle screen

By changeing BulletSprite, we can change it for every weapon (bar laser and support)

Code: [Select]

init 15 python:
    for weapon in storeweps:
        weapon.bullet = None # give weapons the .bullet attribute

init 16 python:
    BiancaAssault.bullet = ["Battle UI/flakbullet map.png", 1.5] # Set the weapon image and rotation
    # Standard is Pulse = 2.0 Kinetic, assault and melee = 1.5, if useing custom images you might need to tweak this, so its not set in bulletsprite

init 5 python:
    class BulletSprite(MissileSprite):
        def __init__(self,parent,target,weapon):
            MissileSprite.__init__(self,parent,target,weapon)
            if weapon.bullet != None and self.type != "Laser": # If its got a custom image use that, otherwise do standard
                self.lbl = im.Rotozoom(weapon.bullet[0], self.angle,weapon.bullet[1])
            else:
                if self.type == "Pulse":
                    self.lbl = im.Rotozoom('Battle UI/pulse map.png',self.angle,2.0)
                elif self.type == "Kinetic":
                    self.lbl = im.Rotozoom('Battle UI/kinetic_round map.png',self.angle,1.5)
                elif self.type == "Assault":
                    self.lbl = im.Rotozoom('Battle UI/flakbullet map.png',self.angle,1.5)
                elif self.type == "Melee":
                    self.lbl = im.Rotozoom('Battle UI/melee_map.png',self.angle-135,1.5) 

Bulletsprite (the display object) will be overwritten so when its made, if the weapon.bullet attribute is set, then it will use that instead. Won't work for lasers because that's defined on the battle screen itself whilst other things are moved across it. Missiles use something slightly different, can look into that if you want when I get home tomorrow.

Just throw them anywhere. Again I havent tested the code as unfortunatly I'm on a train.

Edit:

Just saw the edits, BM.attacker is the ship that's attacking

Try
Code: [Select]
if BM.attacker == seraphim:

rather than bullet.type == rifle

Now the classes file shows an error. Darn

Updated: June 07, 2016, 02:59:38 pm
Did I make a mistake somewhere?

Both classes & screens custom shows errors.

I don't know if I put the init 15 & 16 in the right place, I just put them in classes, right above the self.fire code.
« Last Edit: June 07, 2016, 02:59:38 pm by Void »
The only way to truly hurt a man, is to take everything that he valued and degrade it and remind him of it everyday of his life. But by doing this, you also create a monster, and you will regret ever harming that man, because he will be your greatest horror.

Offline The Bigfoot

Re: [LD] Combat Animation
« Reply #11 on: June 07, 2016, 03:11:27 pm »
Try putting them below everything or in their own file, you might have intertupted an init block. Can you post the message?
I make spaceships! - http://innomenpro.com/forums/index.php?topic=1366.0
Massive Modding tutorial here: http://innomenpro.com/forums/index.php?topic=1251.0
New Award: John Titor [Sep 17, 2015, 10:16:07 PM]:   BigFoot is the official Evil Genius fro mteh forum

Offline Void

Re: [LD] Combat Animation
« Reply #12 on: June 07, 2016, 03:13:57 pm »
Code: [Select]
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/classes.rpy", line 4661, in script
    init 15 python:
  File "game/classes.rpy", line 4662, in <module>
    for ship in storeships:
NameError: name 'storeships' is not defined

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "D:\Novel Collection\Novel\Visual Novels\Sunrider\SunriderLiberationDayUncensored v3.00\renpy\bootstrap.py", line 281, in bootstrap
    renpy.main.main()
  File "D:\Novel Collection\Novel\Visual Novels\Sunrider\SunriderLiberationDayUncensored v3.00\renpy\main.py", line 401, in main
    game.context().run(node)
  File "game/classes.rpy", line 4661, in script
    init 15 python:
  File "D:\Novel Collection\Novel\Visual Novels\Sunrider\SunriderLiberationDayUncensored v3.00\renpy\ast.py", line 805, in execute
    renpy.python.py_exec_bytecode(self.code.bytecode, self.hide, store=self.store)
  File "D:\Novel Collection\Novel\Visual Novels\Sunrider\SunriderLiberationDayUncensored v3.00\renpy\python.py", line 1461, in py_exec_bytecode
    exec bytecode in globals, locals
  File "game/classes.rpy", line 4662, in <module>
    for ship in storeships:
NameError: name 'storeships' is not defined

Windows-7-6.1.7601-SP1
Ren'Py 6.99.8.949
Release 3.00

This is after I put the codes below everything in the classes files. Like this:

Code: [Select]
init 15 python:
    for ship in storeships:
        ship.fire_sounds = {}
           
init 16 python:
    ship.fire_sounds[SeraphimKinetic] = 'sound/Sola Sniper.ogg'
    ship.fire_sounds[SeraphimEnemyKinetic] = 'sound/Sola Sniper.ogg'
    ship.fire_sounds[BiancaAssault] = 'sound/shotgun.ogg'
    ship.fire_sounds[AllianceBattleshipCannon] = 'sound/cannon.ogg'

init 15 python:
    for weapon in storeweps:
        weapon.bullet = None # give weapons the .bullet attribute

init 16 python:
    BiancaAssault.bullet = ["Battle UI/flakbullet map.png", 1.5] # Set the weapon image and rotation
    # Standard is Pulse = 2.0 Kinetic, assault and melee = 1.5, if useing custom images you might need to tweak this, so its not set in bulletsprite
The only way to truly hurt a man, is to take everything that he valued and degrade it and remind him of it everyday of his life. But by doing this, you also create a monster, and you will regret ever harming that man, because he will be your greatest horror.

Offline The Bigfoot

Re: [LD] Combat Animation
« Reply #13 on: June 07, 2016, 03:30:54 pm »
Can you check init.rpy and look for storeships there it should be on line 1009 of the base code? Are you useing a version of LD with return in?
I make spaceships! - http://innomenpro.com/forums/index.php?topic=1366.0
Massive Modding tutorial here: http://innomenpro.com/forums/index.php?topic=1251.0
New Award: John Titor [Sep 17, 2015, 10:16:07 PM]:   BigFoot is the official Evil Genius fro mteh forum

Offline Void

Re: [LD] Combat Animation
« Reply #14 on: June 07, 2016, 03:49:15 pm »
Can you check init.rpy and look for storeships there it should be on line 1009 of the base code? Are you useing a version of LD with return in?

Yes, this is V3.00 which has the [RE]Turn story. I also downloaded the newest script file in the official forums of Sunrider since the new patch seems to mess up the core storyline's sprites from what I saw in one of the posts.

Also, the init.rpy is only until line 844.

There seems to be no storeships there.
The only way to truly hurt a man, is to take everything that he valued and degrade it and remind him of it everyday of his life. But by doing this, you also create a monster, and you will regret ever harming that man, because he will be your greatest horror.