Welcome, Guest. Please login or register.

What openbor you prefer: Double dragon,battletoads or final fight !? by lirexpatrio
[December 07, 2012, 07:15:27 pm]


what are your favorite games OpenBOR?! by lirexpatrio
[December 07, 2012, 07:09:46 pm]


Post Some Awesome Videos by maxman
[December 07, 2012, 05:51:39 pm]


Can @cmd playmusic "aaaa" 1 also increse music sound ? by BeasTie
[December 07, 2012, 05:24:38 pm]


Streets of Rage: Silent Storm by mtrain
[December 07, 2012, 03:45:05 pm]


Site will be down for maintenance on 12/8/2012 thru 12/10/2012 by Damon Caskey
[December 07, 2012, 07:42:42 am]


Cancelled SOR 3d Remake by riccochet
[December 07, 2012, 03:58:33 am]


Dungeon Fighter: B.O.R. by msmalik681
[December 07, 2012, 03:24:27 am]


[TUTORIAL] How to create 4 Games of OpenBOR in 1 CD (650 MB) by magggas
[December 06, 2012, 09:46:25 pm]


custknife by Bloodbane
[December 06, 2012, 09:34:09 pm]


blockfx help by B.Kardi
[December 06, 2012, 04:09:14 pm]


street of age 4 hd by corradlo
[December 06, 2012, 01:41:36 pm]


ClaFan - Classic Fantasy ver 1.17 by soniczxblade
[December 06, 2012, 05:01:20 am]


Bug Archive by Bloodbane
[December 06, 2012, 02:00:44 am]


"Bio-Doom" and "Gears of Doom" by BulletBob
[December 05, 2012, 10:07:21 pm]


Contra Locked 'N' Loaded v2 by Bloodbane
[December 05, 2012, 09:39:43 pm]


Downloadable OpenBoR Manual by BeasTie
[December 05, 2012, 08:31:24 pm]


Having trouble testing changes by B.Kardi
[December 05, 2012, 03:05:53 pm]


DragonBall Absalon by msmalik681
[December 05, 2012, 02:52:13 pm]


[Hi-Res] Swamp by Vibrant
[December 05, 2012, 10:47:14 am]


  • Dot Guests: 144
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.



Author Topic: Scripting Bugs/Issues  (Read 2983 times)

0 Members and 1 Guest are viewing this topic.

Offline Damon Caskey

  • Hero Member
  • *****
  • Posts: 5335
    • The Gorge
Scripting Bugs/Issues
« on: June 01, 2008, 09:51:50 pm »
This is to create a library of bugs and issues with the script engine that are known about until the wiki catches up and documents scripting. To be frank, it is likely any script bugs are going to remain for the life of the engine. However, by its very nature, the scripting engine is capable of dealing with its own bugs fairly easily.

  • Animation change didhitscript crash: Any change of the caller's animation, either through changeentityproperty, performattack, AIflag, etc. attempted within didhitscript will cause instant shutdown. No error will be recorded.

    Workaround: Place the desired animation constant into an entity variable, and then use another script to read variable and apply the animation immediately afterward. You may or may not need dummy frames depending on your application, but make sure to clear the variable once second script has the value.

  • Openborconstant incorrect with panel type: openborconstant("panel") returns 0. The actual value is 1024 as of version 2.1933.

    Workaround: It is normally inadvisable to input constants directly because they may change in later versions, but in this case you do not have a choice. Use "1024" in place of openborconstant("panel"). You might also try creating an artificial constant by assigning the value to a global index variable and calling the value as needed. This would have the advantage of allowing later corrections to be made instantly by editing a single line should the constant value change.

  • takedamagescript/ondeathscript animation change and killentity bugs: These bugs recently drove me nuts trying to root them out. As it happens, the use of any animation change (see Animation change didhitscript crash bug) or killentity() on the caller will eventually cause inconsistent failure of subsequent takedamagescript/ondeathscript calls. In addition, other scripts will also begin experiencing inconsistent failure. To define failure; the scripts simply do not run. No crash, no shutdown, and no errors are logged.

    Workaround: I am currently in process of experimenting with different workarounds to find a feasible, consistent solution.

« Last Edit: September 22, 2008, 05:14:01 pm by Damon Caskey »
OpenBOR Wiki.

Coming Soon:
Spoiler
Fatal Fury Chronicals


Offline Bloodbane

  • Hero Member
  • *****
  • Posts: 7113
  • Dark Dragon
Re: Scripting Bugs/Issues
« Reply #1 on: June 04, 2008, 12:53:36 pm »
- First frame bug:
 The 1st @cmd declared in 1st frame of animation sometimes is ignored completely. It works fine if declared in other frames. Also only the 1st @cmd is ignored, the next ones in same frame is not ignored.

 Workaround: Simply avoid declaring in 1st frame and do it in 2nd frame instead. Or add a copy of 1st frame as the new 1st frame with 1 centisecond delay.
OpenBoR Manual

Basic OpenBoR Tutorials

OpenBoR Tricks & Tutorials

"The more often enemies attack, the more open they are to counter attacks"

Offline SX

  • Administrator
  • Hero Member
  • *****
  • Posts: 2700
    • LavaLit
Re: Scripting Bugs/Issues
« Reply #2 on: June 04, 2008, 01:11:21 pm »
- First frame bug:
 The 1st @cmd declared in 1st frame of animation sometimes is ignored completely. It works fine if declared in other frames. Also only the 1st @cmd is ignored, the next ones in same frame is not ignored.

 Workaround: Simply avoid declaring in 1st frame and do it in 2nd frame instead. Or add a copy of 1st frame as the new 1st frame with 1 centisecond delay.


This could be due to the fact not all animation commands begin with the value 1.  I think some of them begin with the value 0.

Offline Orochi_X

  • Hero Member
  • *****
  • Posts: 3301
  • Now! Count up your crimes.
Re: Scripting Bugs/Issues
« Reply #3 on: June 04, 2008, 01:21:16 pm »
Yeah , I have many 1st frame @cmds.

Maybe you could narrow it down a little? Maybe post an example?


* Orochi_X says : " Sore ga doushita? " :looney:

Offline Bloodbane

  • Hero Member
  • *****
  • Posts: 7113
  • Dark Dragon
Re: Scripting Bugs/Issues
« Reply #4 on: June 04, 2008, 01:32:50 pm »
 Well, since I found that bug in GRAB, I decided to avoid it so I don't know if it still happens in latest devbuild.
OpenBoR Manual

Basic OpenBoR Tutorials

OpenBoR Tricks & Tutorials

"The more often enemies attack, the more open they are to counter attacks"

Offline Bloodbane

  • Hero Member
  • *****
  • Posts: 7113
  • Dark Dragon
Re: Scripting Bugs/Issues
« Reply #5 on: July 23, 2008, 06:03:53 am »
 Loadsample has issues:
1. It steals other SFX channel slots making the latter unplayed when they are supposed to be played.
2. It produces skreech if 2 loaded samples are played at same time.

OpenBoR Manual

Basic OpenBoR Tutorials

OpenBoR Tricks & Tutorials

"The more often enemies attack, the more open they are to counter attacks"

Offline MCW

  • Hero Member
  • *****
  • Posts: 1076
  • BOR = Beats Of Rage
Re: Scripting Bugs/Issues
« Reply #6 on: February 01, 2009, 05:22:36 pm »
Does anyone notice that "animpos" or "updateframe" able to change to previous frame and last frame but it will crash if change to next frame.
« Last Edit: February 01, 2009, 05:34:57 pm by MCW »


Be a Good Reader,
Read the post from first word until to the last.

Offline utunnels

  • Developer
  • Hero Member
  • *****
  • Posts: 2713
Re: Scripting Bugs/Issues
« Reply #7 on: November 13, 2011, 11:48:16 pm »
I have been helping someone in their project recently so I rechecked the script engine and felt it is necessary to write a topic for the flaws of the engine and solutions.

Quote from: DC
Animation change didhitscript crash: Any change of the caller's animation, either through changeentityproperty, performattack, AIflag, etc. attempted within didhitscript will cause instant shutdown. No error will be recorded.
Seems this has been fixed, but I don't know when (consider this topic is really old, I won't check the rest of them).

Some basis:


1. Anmation script loopholes:
Animation script is called when animation frame is updated, so if you use animationscript (@script or @cmd) to change animation or frame, current script interpreter will be reseted for the new call. So if you change animation or frame and it is not the last line of your script, it may cause bugs. By far this is the root of various bugs, and can't be fixed unless the script engine is updated to support multiple instances or animation script can be delayed until current one is finished.


2. killing entity
All scripts are cleaned when the entity is killed. So similar problems happen like the animation script. Especially getlocalvar won't work because the list is empty.


3. nested call
When I implement the script compiler, I removed some features from the symbol table based interpreter to gain max speed and least memory cost. At first this is not a problem because script was originally designed to be a workaround of custom frame commands, the logic is usually simple (a couple of if-else, perhaps). Unfortunately the system has been grown so fast during the years and I see many users have designed huge and complex system for their mods. So sooner or later the incomplete script engine will show the flaws.

The most important structure removed is the stack, without it you can't use nested function calls (function a calls function a). In current system, functions are just another form of label and jump target.

I'm not sure if it can be fixed because the source code has grown too long, and changing it requires a lot of work and we have to worry about backward compatibility.
« Last Edit: November 13, 2011, 11:57:48 pm by utunnels »

Offline Itsuchi KS

  • Full Member
  • ***
  • Posts: 218
  • Pain Gives Birth To Weakness-Compelling Strength
Re: Scripting Bugs/Issues
« Reply #8 on: February 28, 2012, 04:48:38 pm »
I have an issue with Yun's "weapon". When I make him get in his new stance, he only does the first three attacks and he has 6 attacks. I have it set to combostyle 2 and atchain 1 2 3 4 5 6. Does anyone know why this is? It's on Build 3.0.0.0

Offline Bloodbane

  • Hero Member
  • *****
  • Posts: 7113
  • Dark Dragon
Re: Scripting Bugs/Issues
« Reply #9 on: February 28, 2012, 09:17:28 pm »
 You posted this in wrong thread. Please repost in proper thread in issues section and also tell us which version you are using.
OpenBoR Manual

Basic OpenBoR Tutorials

OpenBoR Tricks & Tutorials

"The more often enemies attack, the more open they are to counter attacks"

Offline utunnels

  • Developer
  • Hero Member
  • *****
  • Posts: 2713
Re: Scripting Bugs/Issues
« Reply #10 on: February 29, 2012, 12:16:51 am »
Anyway, it sounds like a model issue.
I don't know if you put the atchain correctly in the weapon model(not the main model of your character).

Offline Itsuchi KS

  • Full Member
  • ***
  • Posts: 218
  • Pain Gives Birth To Weakness-Compelling Strength
Re: Scripting Bugs/Issues
« Reply #11 on: March 05, 2012, 11:30:46 pm »
It's the same way. I put my characters in Rocket Viper and they worked perfectly but Yun's weapon doesn't work right in my ROD mod...even when I use the same build as Rocket Viper. Nothing is changed but his speed and attack combo and his special2.

 



 0%




SimplePortal 2.3.3 © 2008-2010, SimplePortal