OpenBOR v3.0 Build 4432 (Windows/Wii/Android/PSP)

Status
Not open for further replies.

White Dragon

New member
OpenBOR v3.0 Build 4432 (Windows/Wii/Android/PSP)
Download:
https://sourceforge.net/projects/openbor/files/

News from r4316:

internal works:
- optimized and improved new animscript code
- fixed new debug mode by DC
- reorganize menu functions with Big-endian style naming by DC
- fixed logic test wall/platform/hole
- new internal function font_string_width_max(char *string, int font): Accepts pointer to an array of strings and returns width of the largest
- some works to avoid memory waste: moving struct to pointers by DC
- engine is now running on multiple attack and body boxes by DC
- various code optimizations by DC
- added an internal function multistrcapsp() that accepts multi str arguments and concatenate them
- update translation

script updates:
- add srand(seed) to script
- added jumpspeed in entityprop
- now allowed boolean NOT operator ! for constants too
- added "porting" to openborvariants to get console version
- now keyscript can work in all menus (not in level or in select screen only)
- added noshowcomplete in openborvariants
- added playwebm(path, noskip) to script
- added entityproperty: "weapnum" and "numweapons" and playerproperty: "numweapons"
- added weaploss to entityprop:
change/get entityproperty(self,"weaploss") retrieves/set the weapon losing type
change/get entityproperty(self,"weaploss",1) retrieves/set the weapon losing flag
- added offscreen_noatk_factor in entityproperty
- added offscreenkill in entityproperty
- added new optional parameter to bindentity():
sortid. by default is -1. a binded ent has a sortid
sortid = binded_ent.sortid -1. if you set the param:
sortid = binded_ent.sortid + custom_sortid
- addded boomerang entityprop: changeentityproperty(entity,"boomrang",acceleration,horizontal_distance)
getentityproperty(entity,"boomrang",flag)
flag:
0 = acceleration
1 = horizontal_distance
- added dying optional paramin entityproperty: getentityproperty(entity,"dying",1) retrieve remap 2
- added executeanimation(entity, int anim, int resetable);
it works like performattack() but just you play an animation without animation loop.
This function avoid changeentityproperty(entity,"animation",value) loop issue!
- added "subtype" to  changeentityproperty(). ex.: changeentityproperty(self, "subtype", value);
- added common_animation_normal (takeaction)
- added "custom_target" to entityprop. If set it you can force an enemy to use it as target.
- improving arrays: islast(array), isfirst(array), previous(array)
- added pausesamples(toggle);
- added trunc(double) and round(double)
- now are valid multiple assignment like: x = y = 1;

general updates:
- fixed options menu and joined cheatsmenu into optionsmenu to avoid to re-enter in menu to find cheats
- fixed label offsets in options menu
- added nodebug in models.txt. set nodebug 1 to disable debug menu in options
- spawn in not-level screen now allowed
- increase MAXQSPRITES to 5000
- added new levelorder command: "pauseoffset"
    write "pauseoffset" in levels.txt to change fonts and offset of pause strings.
    USAGE:
    pauseoffset {font0} {font1} {xpos} {ypos} {font_pause} {xpos_pause} {ypos_pause}
- added model name in debug info (features in debug menu)
- restored counterrange conditions according to manual and added condition 4:
    4: The counter will always be used and if health - attack damage <= your health will be 1 (rage).
    damaged determines whether the entity will receive damage from the hit or not
- added noshowcomplete command.
    set noshowcomplete 1 in a set to not show a complete screen after NEXT command.
    noshowcomplete is valid for script with openborvariant too
- added ignoreattackid to animation header command:
    if set ignoreattackid 1, the attack will take effect every frame
- added full save support for: skipselect, select screen, allowselect
- added offscreen_noatk_factor in model entity
- added boomerang {acceleration} {horizontal_distance} to set the boomrang acceleration and max horizonal distance for aimove boomerang
- added dying optional param {remap2}: dying {remap1} {health1} {health2} {remap2}
{remap2} is valid for {health2}
- improvement for AIMOVE2_NOTARGETIDLE (now it works)
- added subtype boomerang
- added animation getboomerang and getboomeranginair
- improved TYPE_NONE entity with try_move to allow it to is/isn't subject to...
- added followcond 5: this animation will followup as long as it hits an enemy and the target does not get killed or block the attack.
- increased max character length of followselect parameter to 1024 characters
- added shadowopacity {-2 or -1 or 0~255} to level cmd

hotfixes:
- rand32 returns positive/negative rand number
- fixed loading lag
- block_find_target() bug fixed
- fixed textobj bug
- fixed jugglepoint bug
- fixed counterrange
- fixed lasthitt on changeopenborvariant
- fixed draw box on entity (debug options) to show draw boxes Always in front of the relative entity
- fixed some animvalid checks
- fixed and conforming generate_basemap params to wall/hole params
- fixed openborvariant "current_branch" protection to invoke it wherever
- fixed internal func char *findarg(char *command, int which) that fixes bugs with getfilestreamarguments()
- fixed nojoin bug
- fixed blockback, blockpain in getentityprop
- fixed followcond 4
- fixed draw textobj bug
- fixed energycost init bug
 
no bug! It works well!
to make a front panel use a bigger number (setlayer 1 is not enough, use setlayer 200)
no changes for setlayer property.

good luck for your mod!  ;)

Ps. I remember you that setlayer is a value that increase the Z drawing position of a entity. The base value is PLAYER_MIN_Z-46.
So total value is PLAYER_MIN_Z-46+setlayer if setlayer != 0.
 
new update:
- added new optional parameter to bindentity():
sortid. by default is -1. a binded ent has a sortid
sortid = binded_ent.sortid -1. if you set the param:
sortid = binded_ent.sortid + custom_sortid
 
when setlayer 1 is removed it works as I intended
Because your setlayer is wrong, take a look:

setlayer {int}
~This entity will be displayed as if it were at z position {int}, regardless of it's actual position.

So, if you use setlayer 1 it will be displayed as if it was at Z = 1. The name setlayer is kinda misleading, because its works not like a true layer but as a Z position. If it worked as a true layer, it would be in front of everything on the screen (you can archive the same effect setting a very high Z position).


@WD
- engine is now running on multiple attack and body boxes by DC
Was this finished? We can already use it?

Also, can you look at the openborvariant list and help us explaining the missing ones, like  "gfx_y_offset", "sample_play_id",    the difference between "lasthita" and "lasthity", "lasthitt", etc?
http://www.chronocrash.com/forum/index.php?topic=1361.msg14998#msg14998
And if you added any new variant, can you report it?

Thanks
 
O Ilusionista said:
Was this finished? We can already use it?

No. The hit detection code is working as if there were multiple boxes, but you can only define box 0. I'll get that all finished when finals are over.

DC
 
O Ilusionista said:
Also, can you look at the openborvariant list and help us explaining the missing ones, like  "gfx_y_offset", "sample_play_id",    the difference between "lasthita" and "lasthity", "lasthitt", etc?
http://www.chronocrash.com/forum/index.php?topic=1361.msg14998#msg14998
And if you added any new variant, can you report it?

Thanks

Ok!
gfx_x_offset and gfx_y_offset are the X,Y coords of the screen.
gfx_y_offset_adj is the shift relative to gfx_y_offset
lasthita == lasthity (lasthita is deprecated)
lasthitt is the last hit type (ex. ATK_NORMAL)
sample_play_id is the last sound ID played (useful to stop the last sound played for example)
viewportx, viewporty, viewportw, viewporth are X,Y and Width, Height values for scrolling backgrounds/foregrounds
hresolution/vresolution are the horizontal/vertical screen resolutions
 
Can something be done about nojoin? It has never worked correctly for me. I've tried the normal way and also using O Ilusionista's script but the result has always been the same.
nojoin 1 is set in the level and Player 2 tries to join by pressing start. Player 2 can push left or right to scroll through the playable characters but can't actually select one. If Player 1 dies at any point, the game now has to be turned off manually. It won't end because Player 2 can't select a character and both players can't pause the game to quit.
UFYWogC.png

If a player presses start to join in a level with nojoin 1 they should not be able to even scroll through the characters. I posted about this a long time ago here and it was never solved: http://www.chronocrash.com/forum/index.php?topic=1562.msg18755#msg18755
 
Can something be done about nojoin? It has never worked for correctly me. I've tried the normal way and also using O Ilusionista's script but the result has always been the same.
nojoin 1 is set in the level and Player 2 tries to join by pressing start. Player 2 can push left or right to scroll through character but can't actually select one. If Player 1 dies at any point, the game now has to be turned off because it won't end because Player 2 can't select a character and both players can't pause the game to quit.

The code works, since I use on my game. NOJOIN is working as it is intended to be - it controls if you can JOIN the game, not if you can select or not (its a just a minor issue). About the second case, where the player dies, you need to include a NOJOIN code on your ONDEATHSCRIPT or you will be locked forever.
 
O Ilusionista said:
NOJOIN is working as it is intended to be - it controls if you can JOIN the game, not if you can select or not (its a just a minor issue).

Looking at the source code, it seems it is supposed to say "Please Wait" instead of having the ability to select a character.

Line 471 in openbor.c:
Code:
int                 nojoin              = 0;					// dont allow new hero to join in, use "Please Wait" instead of "Select Hero"
 
Viper Snake said:
Can something be done about nojoin? It has never worked correctly for me. I've tried the normal way and also using O Ilusionista's script but the result has always been the same.
nojoin 1 is set in the level and Player 2 tries to join by pressing start. Player 2 can push left or right to scroll through the playable characters but can't actually select one. If Player 1 dies at any point, the game now has to be turned off manually. It won't end because Player 2 can't select a character and both players can't pause the game to quit.
UFYWogC.png

If a player presses start to join in a level with nojoin 1 they should not be able to even scroll through the characters. I posted about this a long time ago here and it was never solved: http://www.chronocrash.com/forum/index.php?topic=1562.msg18755#msg18755


Mmm.. It's a bug!
fixed!

now are valid multiple assignment like: x = y = 1;
 
Thanks for fixing that! I've found another bug.

Controller support has been broken since build 4108. OpenBOR still detects gamepads and lets you setup the buttons, but they do not work when you press ok and return to the control options. The controllers I tested were a Xbox 360 and Xbox One controller which work fine on 4107.
 
Hey White Dragon, I have something to report and something to suggest:

1- offscreen_noatk_factor its working, but once you use "offscreen_noatk_factor 1" as the manual says, you will get an error at the log
Command 'offscreen_noatk_factor' not understood in file 'data/chars/enemies/gunner/gunner.txt'!
its not a big deal since it is working, but I just don't get why its reporting an error.

2- I have a suggestion for the command DYING
dying {remap} {health1} {health2}

~If this entity's health drops to or below {health1}, they will flash between their normal pallete and the {remap} pallete.
~If their health drops to or below {health2}, they flash even faster.

Dunno who put this on the engine, its brilliant! Works like a charm and its pretty easy to use.
But its possible to add a 4th value for a second remap? This second map would take in action only when you are in {health2} case.

So it would be like dying {remap} {health1} {health2} {remap2}
When you are in HEALTH1 case, it would use REMAP. When you are int HEALTH2 case, it would use REMAP2
This is to recreate the behaviour in some old arcade games, where when the boss is at 50% of life, he blinks in purple. If he has only 25%, blinks in red.

Do you think its possible? I just a cosmetic thing and you probably has other more important issues, but its cool :)
 
O Ilusionista said:

Ick, no no no no! No adding more arguments. That's what we're trying to get away from. I'm not thrilled with hard coding this into the engine at all honestly - it's a base feature that works for 99% of cases, and that 1% extension is why we have script, but I get why you'd want it.

If it was to be done, a separate, more extendable command (think the new attack and beat box style) would be the way to go.

DC
 
O Ilusionista said:
Ok, thanks anyway.

Don't get me wrong, I'm not stonewalling - just that if we add it, it should be with a mind toward future compatibility rather than stacking on more stuff.

DC
 
O Ilusionista said:
But I did't got you wrong :)

About the offscreen_noatk_factor, any clue about the error message?

Not at the moment, but I can take a look after the last final tomorrow and see what's up.
 
Viper Snake said:
Thanks for fixing that! I've found another bug.

Controller support has been broken since build 4108. OpenBOR still detects gamepads and lets you setup the buttons, but they do not work when you press ok and return to the control options. The controllers I tested were a Xbox 360 and Xbox One controller which work fine on 4107.

No bug, controllers are ok. 4108 uses SDL2.0.
Tested my controllers and work well.
Maybe xbox gampads need some drivers...

O Ilusionista said:
Hey White Dragon, I have something to report and something to suggest:

1- offscreen_noatk_factor its working, but once you use "offscreen_noatk_factor 1" as the manual says, you will get an error at the log
Command 'offscreen_noatk_factor' not understood in file 'data/chars/enemies/gunner/gunner.txt'!
its not a big deal since it is working, but I just don't get why its reporting an error.

offscreen_noatk_factor works well.
Your use is wrong...
You need to set it in models.txt not in entity.txt
BTW you are right, I expect that that use is useful for a single enemy.
So I added a new offscreen_noatk_factor for an entity.txt (handable via script too)


O Ilusionista said:
So it would be like dying {remap} {health1} {health2} {remap2}

Sorry DC, after the update I noticed what you wrote. But I had already made the update...
BTW dying {remap} {health1} {health2} {remap2}
the new param {remap2} is optional (and handable via script).
I'm sorry, I hope this does not raise too many problems.
In fact it is a fair update...
Recapping...

News:
- added openborvariant background in write mode
- added openborvariant textbox in read mode
- fixed internal func char *findarg(char *command, int which) that solve some bugs with filestreamappend()
- added entityproperty: "weapnum" and "numweapons"
- added playerproperty "numweapons"
- added offscreenkill in entityproperty
- added offscreen_noatk_factor in model entity
- added offscreen_noatk_factor in entityproperty
if offscreen_noatk_factor is set, it overwrite the global offscreen_noatk_factor in modelstxt
- added dying optional param {remap2}: dying {remap1} {health1} {health2} {remap2}
{remap2} is valid for {health2}
- added dying optional paramin entityproperty: getentityproperty(entity,"dying",1) retrieve remap 2
- added boomrang move:
set it with aimove boomrang in modeltxt entity
- added boomrangacc {float} to set the boomrang acceleration for aimove boomrang
- added boomrangacc in entityproperty

IMPORTANT: now are valid multiple assignment like: x = y = 1; in script


Ps. Sorry, but in these days I will be very busy, if you find any bugs, I hope will deal with DC...
 
Status
Not open for further replies.
Back
Top Bottom