Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
ryleyra

Registered:
Posts: 2,993
Reply with quote  #1 

I've been looking into upgrading my scripts from 2.6 to 2.7, and I've discovered that there are some definite incompatibilities that make 2.7 not backwards compatible with 2.6 scripts, and 2.7 scripts not backwards compatible with the 2.6 game. This hasn't always been the case, sometimes older scripts have worked just fine, but more recent versions have tended to break the scripting system.

I thought I would list the incompatibilities I've found just so other scripters can watch out for them. Plus, this might be a useful thing to add to the wiki, especially if I can continue this list to versions all the way back to 1.7. It might help people in their efforts to update old scripts.

For now, this is just from 2.6 to 2.7. I'll list the issue, the severity, and some notes or details:

ISSUE: Filenames in play_sound_now are relative to the Artemis directory, not the mission directory.
SEVERITY: Script will crash
NOTES: Filename can now be absolute or relative if starting with "./"

ISSUE: Wrecks have been changed from monsterType 7 to 8
SEVERITY: Wrecks will be replaced with Jellies
NOTES: See the next issue

ISSUE: Monsters created after an asteroid field will appear in that field, no matter what coordinates are specified
SEVERITY: Monster locations unpredictable, wrecks can appear away from the destroyed target that spawned it (even in the normal game modes)
NOTES: Wrecks or monsters can be created and then relocated to the proper position.

ISSUE: Pirates must destroy an enemy before they will be allowed to dock.
SEVERITY: Can prevent docking in non-combat missions.
NOTES: It is simple enough to spawn an enemy to let the players meet this requirement. It is more difficult to detect when a player is using a Pirate ship. Potential solutions are checking for a lack of nukes, checking shield strength, or both.

ISSUE: Pirates can loot surrendered ships
SEVERITY: If using the isSurrendered property to render a ship "neutral", Pirates can gain free energy and torps
NOTES: Pirates can be excluded from the mission by destroying the player ship when detected as a pirate ship.

ISSUE: set_player_grid_damage no longer defaults to the first player ship
SEVERITY: The script will have to be edited to add name="Artemis"
NOTES: use_gm_position still works, I think player_slot still doesn't (I'll need to test this)

ISSUE: Modifying a monster brain stack breaks the monster's AI
SEVERITY: Scripts cannot modify monster behavior
NOTES: All commands added become PLAY_IN_ASTEROIDS

Although I'm not taking this list back that far as of yet, note that the biggest change from 2.4 to 2.5 was the deprecation of incoming_message. Any mission that used audio files had to be rewritten, which was my purpose in rewriting the stock mission "The Waning Dark" in the first place.

Another BIG change was the removal of eliteEnemyBits and eliteEnemyAI, which were replaced with set_special and the brain stack. I'm not sure which revision this change was, but I think it's in the wiki. While some old commands (like create whale) still work, these two definitely do not.

Dave Thaler

Registered:
Posts: 502
Reply with quote  #2 
Some other changes in 2.7:
* missileStoresECM changed to missileStoresEMP
* countECM changed to countEMP

I'm pondering how many of these we could add functionality into Artemis Mission Editor to automatically fix.   Things like the two I list above would be easy to do algorithmically.   Things like wrecks turning into jelly (eddies in the space-time continuum, ya know...) would be harder to auto-fix since you have to have a way to tell whether it was a pre-2.7 script, such as noticing that something else has to be converted.

But yeah, breaking changes to scripts in Artemis releases does make it more difficult to build up an interesting library of scripted missions over time.
Xavier Wise

Registered:
Posts: 1,139
Reply with quote  #3 
Really appreciate these, keep 'em coming! It'll make fixing problems in my own scripts easier, and I'll post up anything I find too.
__________________
Fleet Captain Xavier Wise - TSN Sabre
Link to TSN RP Community website
Richard

Registered:
Posts: 127
Reply with quote  #4 
Quote:
Originally Posted by ryleyra

ISSUE: Monsters created after an asteroid field will appear in that field, no matter what coordinates are specified
SEVERITY: Monster locations unpredictable, wrecks can appear away from the destroyed target that spawned it (even in the normal game modes)
NOTES: Wrecks or monsters can be created and then relocated to the proper position.



Hi Ryleyra,

I´ve noticed the monster do not respond to any command other than "PLAY_IN_ASTEROIDS". No matter if a clear the ai stack, any command I give to them is interpreted as play in asteroids.


Mike Substelny

Avatar / Picture

Administrator
Registered:
Posts: 2,402
Reply with quote  #5 
I think you can expect Thom to fix a few of these before Armada. I'm thinking #1 and #3 but I could be wrong.
__________________
"The Admiralty had demanded six ships; the economists offered four; and we finally compromised on eight."
- Winston Churchill
ryleyra

Registered:
Posts: 2,993
Reply with quote  #6 
This isn't an incompatibility, but I thought it was interesting. Anomalies all have the name "ANOM", no matter what name they are given when created. They clearly can be referred to by name, because I was able to select a specific anomaly, destroy it, and replace it with another. Although it could have simply selected the first anomaly created, I will have to investigate further to confirm that the name is retained.
Xanthus

Registered:
Posts: 5
Reply with quote  #7 
Quote:
Originally Posted by Richard


Hi Ryleyra,

I´ve noticed the monster do not respond to any command other than "PLAY_IN_ASTEROIDS". No matter if a clear the ai stack, any command I give to them is interpreted as play in asteroids.



 
Seconded, I started scripting recently and was looking here to see what I was doing wrong. Monsters are all "PLAY_IN_ASTEROIDS" no matter what, unless there is something different you need to do that I'm not aware of.
ryleyra

Registered:
Posts: 2,993
Reply with quote  #8 
I just tested this and confirmed it happens any time you try to add brain stack commands to a monster with add_ai. No matter what command you add, the PLAY_IN_ASTEROIDS command is what is added.

Note that you can just create monsters as usual and they should work fine. This only happens if you try to change the brain stack originally generated for the monster.

I've added this to the list, since it's pretty serious.

Darrin

Registered:
Posts: 164
Reply with quote  #9 
Does clearing the monster's AI stack restore their "normal" behavior, or are they stuck on PLAY_IN_ASTEROIDS for the rest of the mission?

(In my current mission, I'd like to add some monsters that really are playing in asteroids until the player gets close, and then I'd like them to interact/attack/etc. with the player.)


ryleyra

Registered:
Posts: 2,993
Reply with quote  #10 
Quote:
Originally Posted by Darrin
Does clearing the monster's AI stack restore their "normal" behavior, or are they stuck on PLAY_IN_ASTEROIDS for the rest of the mission?


Unfortunately, once you clear the ai stack, you can't rebuild it without adding the PLAY_IN_ASTEROIDS commands.

Your best bet is to destroy and recreate the monsters when you want to restore the original brain stack. It's clumsy, but at least it'll do the job.

Mike Substelny

Avatar / Picture

Administrator
Registered:
Posts: 2,402
Reply with quote  #11 
Quote:
Originally Posted by Richard

I´ve noticed the monster do not respond to any command other than "PLAY_IN_ASTEROIDS". No matter if a clear the ai stack, any command I give to them is interpreted as play in asteroids.


I am using a beta of Artemis 2.71 and this problem *seems* to be fixed. I have been successfully adding to the AI stacks of monsters and they have been behaving as I intended. I have not had occasion to try all possible combinations of AI blocks so it's possible there is still a minor bug, but the major bug is fixed. I can definitely get monsters to move on command and attack on command without dilly-dallying in the asteroids.

I hope Artemis 2.71 will be released in the next few days.

__________________
"The Admiralty had demanded six ships; the economists offered four; and we finally compromised on eight."
- Winston Churchill
Richard

Registered:
Posts: 127
Reply with quote  #12 
Nice!!!
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.