Catog

Professional Internal Screamer
Veteran
Joined
Feb 9, 2016
Messages
76
Reaction score
27
First Language
English
Primarily Uses
RMMV
Hi there,

I'm looking to edit the OTB Turn Order in the code (edit the background, adjust the sprite view so it fits with my four-frame sprites), but for whatever reason, the main body of the code uses 'var _0x380f =', etc., etc., all on one line.

I thought this might be encryption, but looking on the download page, I'm apparently allowed to edit the code. Furthermore, I'm seeing people talk about it using regular js language.

Would anyone be able to tell me why it's like this, and offer solutions? I'd really hate to drop this system, but I also don't want to be stuck with a default look that doesn't fit with my sprites.
 

zerobeat032

Oh, it's that Zerobeat kid...
Veteran
Joined
Mar 28, 2014
Messages
495
Reaction score
1,200
First Language
English
Primarily Uses
RMMV
that's really weird... mines doesn't look like that and I was indeed able to edit it for reasons similar to yours. tho, all I did was tell the plugin to look for the battlers in a different folder and make normal style sprite sheets for people. even then, I couldn't figure out the background tho...

Um... I'm not sure why all of a sudden it's one line of code tho. that's a pain when something isn't working and all you'd need to do is a simple edit of sorts. or in a situation like yours.
 

MikeMakes

Veteran
Veteran
Joined
Sep 30, 2015
Messages
215
Reaction score
50
First Language
English
Primarily Uses
Hey, I have the same EXACT experience with Olivia's other plugins. What text editor / js viewer are you using to look at the code?

I'm using regular notepad
 

Cormorant42

Veteran
Veteran
Joined
Sep 17, 2019
Messages
114
Reaction score
54
First Language
English
Primarily Uses
RMMV
What text editor / js viewer are you using to look at the code?

I recommend either Notepad++ or Sublime Text.

Would anyone be able to tell me why it's like this, and offer solutions?

Basically what you're looking at is minified javascript. Say I have the following code:

if (thisvar == thatvar) { for (i = 0; i < 30; i++) { let j = i + myFunction.method(); console.log('The result is ' + j + '!'); }; };

It's all fine and dandy, right? Well, that same code could be written in the following way:

if (thisvar == thatvar) { for (i = 0; i < 30; i++) { let j = i + myFunction.method(); console.log('The result is ' + j + '!'); }; };

The reason is that Javascript generally ignores newline characters, tabs, and spaces unless they're in a string (wrapped in "double quotes" or 'single quotes'), and so all Javascript code can be minified to a single line that the computer will still be able to read. The reason why people don't write in minified JS is because it's extremely hard for humans to follow, and so we use multiple line syntax.

What you're going to want to do is either run it through a JS deminifier (I have no idea where to find one of those, but I'm sure they exist), or deminify it yourself. Every semicolon; indicates the end of a line. It'll probably take a few tries to get it right but I'm sure you can figure it out.
 

Catog

Professional Internal Screamer
Veteran
Joined
Feb 9, 2016
Messages
76
Reaction score
27
First Language
English
Primarily Uses
RMMV
Basically what you're looking at is minified javascript. Say I have the following code:

if (thisvar == thatvar) { for (i = 0; i < 30; i++) { let j = i + myFunction.method(); console.log('The result is ' + j + '!'); }; };

Okay, so I used a code deminifier, but the code is still very odd to me.
For a small excerpt:

Code:
   Bitmap[_0x2487("0x7f")][_0x2487("0xd0")] = function (_0x486924, _0x2e70f1, _0x2d1270, _0xe9d8ef, _0x27ede0, _0x4912ee) {
        var _0x2bcc1a = this[_0x2487("0x2a")];
        _0x2bcc1a[_0x2487("0xf6")]();
        _0x2bcc1a["beginPath"]();
        _0x2bcc1a[_0x2487("0x96")](_0x486924[0x0], _0x486924[0x1]);
        for (var _0x570372 = 0x2; _0x570372 < _0x486924["length"]; _0x570372 += 0x2) {
            _0x2bcc1a[_0x2487("0x1a3")](_0x486924[_0x570372], _0x486924[_0x570372 + 0x1]);
        }
        _0x2bcc1a[_0x2487("0x1a3")](_0x486924[0x0], _0x486924[0x1]);
        _0x2bcc1a["strokeStyle"] = _0x2e70f1;
        _0x2bcc1a[_0x2487("0xfe")] = _0xe9d8ef;
        if (_0x4912ee) {
            _0x2bcc1a[_0x2487("0x8a")]();
        }
        _0x2bcc1a[_0x2487("0x15b")] = _0x27ede0;
        _0x2bcc1a[_0x2487("0xf9")] = _0x2d1270;
        _0x2bcc1a[_0x2487("0xc6")]();
        _0x2bcc1a[_0x2487("0x15b")] = 0x1;
        _0x2bcc1a[_0x2487("0xb0")]();
        this[_0x2487("0x45")]();
    };
    Yanfly[_0x2487("0x1c")]["BECStartActCmd"] = !![];
    if (Olivia[_0x2487("0x13c")][_0x2487("0x149")]["ForceBattleSystem"]) {
        Yanfly[_0x2487("0x1c")][_0x2487("0x33")] = _0x2487("0x6");
    }
    Yanfly[_0x2487("0x1c")][_0x2487("0x22")] = ![];
    Yanfly[_0x2487("0x1c")][_0x2487("0x182")] = ![];
    DataManager[_0x2487("0x1a5")] = function (_0x49cc00) {
        if (BattleManager[_0x2487("0xca")]() && Olivia[_0x2487("0x13c")][_0x2487("0x149")]["BuffDebuffAgiConvert"] && !!_0x49cc00 && !_0x49cc00["_otbBuffDebuffAgiConvert"]) {
            _0x49cc00[_0x2487("0x1a")] = !![];
            for (var _0x544b4a = 0x0; _0x544b4a < _0x49cc00[_0x2487("0xe1")]["length"]; _0x544b4a++) {
                var _0x79c1af = _0x49cc00[_0x2487("0xe1")][_0x544b4a];
                if (_0x79c1af["code"] === Game_Action[_0x2487("0x80")] && _0x79c1af["dataId"] === 0x6) {
                    _0x49cc00["note"] += _0x2487("0x8b");
                }
                if (_0x79c1af[_0x2487("0xbd")] === Game_Action[_0x2487("0x80")] && _0x79c1af[_0x2487("0x10d")] === 0x6) {
                    _0x49cc00["note"] += _0x2487("0x123");
                }
            }
        }
    };

I don't know if this is calling something already existing, but it just seems so foreign to javascript.

This is from the stand-alone download of the OTB, so I don't know if it's different taken from the Sample Project.


EDIT:

It could be pulling from this - I think it's an array? - here:


Code:
var _0x380f = [
    "_spriteContainer",
    "updateClearUnableBattlers",
    "hide",
    "clearResult",
    "<OTB\x20Target\x20Next\x20Turn:\x20-1>",
    "___Game_Battler_consumeItem___",
    "_width2",
    "_createdFirstTurnActionOrders",
    "otbFailedEscape",
    "processEscape",
    "selectNextCommand",
    "splice",
    "_width1",
    "createConstants",
    "removeChild",
    "characterIndex",
    "OTB\x20Background\x20Actor\x20Color",
    "startTurn",
    "BackgroundEnemyColor",
    "updateShiftOrder",
    "___BattleManager_isTurnBased___",
    "_otbTimesActedThisTurn",
    "onBattleStart",
    "normalColor",
    "_nextTurnActionBattlers",
    "_instance",
    "startAction",
    "_helpWindowY",
    "svBattlerName",
    "OctoBattle",
    "description",
    "___Scene_Battle_createHelpWindow___",
    "YEP_ImprovedBattlebacks",
    "_background1Sprite",
    "___Game_Battler_onTurnEnd___",
    "selectPreviousCommand",
    "getNextSubject",
    "BEC",
    "ActionTimeOrderRandomize",
    "updateStateTurns",
    "escape",
    "updateBattleManagerRequests",
    "OTB",
    "currentAction",
    "OTB\x20Sprite\x20Opacity\x20Speed",
    "updateBattlebackGroupRemove",
    "___BattleManager_selectPreviousCommand___",
    "_requestNextTurnUpdateInstantly",
    "createBattlerSpriteAtEnd",
    "makeCommandList",
    "endOTBAction",
    "abs",
    "_phase",
    "createBackground1Sprite",
    "applyOTBAddAction",
    "_back1Sprite",
    "drawBackgroundLines",
    "parameters",
    "_otbFailedEscape",
    "OTB\x20Display\x20Current\x20Text",
    "globalAlpha",
    "_requestCurrentTurnUpdateInstantly",
    "length",
    "_logWindow",
    "undecided",
    "_baseScale",
    "onActionEndStateEffects",
    "createNewSpritesFor",
    "getSelectedBattleTargets",
    "createReturnedBattlerSprite",
    "DisplayY",
    "loadSvActor",
    "OTB\x20Display\x20X",
    "___BattleManager_startAction___",
    "getNextSubjectOTB",
    "canEscape",
    "_battleField",
    "YEP_X_AnimatedSVEnemies",
    "disposeSprite",
    "Enemy\x20",
    "startInput",
    "_actionBattlers",
    "_requestNextTurnUpdate",
    "makeActionOrdersOTB",
    "_requestClearUnableBattlers",
    "OTB\x20Mechanics\x20Buff\x20Debuff\x20AGI\x20Convert",
    "_requestNextTurnPreview",
    "loadCharacter",
    "___BattleManager_endAction___",
    "_hideOTBTurnDisplay",
    "currentSymbol",
    "isPlaytest",
    "turnCount",
    "BattleManager_endAction",
    "createForceActionFailSafes",
    "ForceBattleSystem",
    "___Game_BattlerBase_paySkillCost___",
    "___BattleManager_processTurn___",
    "ceil",
    "PartyEnBattle",
    "OTB\x20Display\x20Next\x20Size",
    "HelpWindowMoveSpeed",
    "anchor",
    "otbClearActionOrdersOfUnableBattlersArray",
    "_currentTurnSprites",
    "___Game_Action_customEffectEval___",
    "setupBattlerBitmapFrame",
    "loadPreForceActionSettings",
    "contents",
    "index",
    "commandEscape",
    "___BattleManager_makeActionOrders___",
    "hasSVBattler",
    "addChild",
    "addActor",
    "forceAction",
    "max",
    "aliveMembers",
    "Battle\x20System\x20OTB\x20Error",
    "addEscapeCommand",
    "createPreviewSprite",
    "contentsOpacity",
    "___Game_BattlerBase_hide___",
    "removeState",
    "OTB\x20Mechanics\x20Remove\x20Restrict\x20Next",
    "___BattleManager_isDTB___",
    "_battlerHue",
    "OTB\x20Mechanics\x20Action\x20Speed\x20Convert",
    "_actorCommandWindow",
    "setupBattlerBitmapScale",
    "input",
    "requestMotionRefresh",
    "lineTo",
    "YEP_BuffsStatesCore",
    "otbBuffDebuffAgiConvert",
    "OTB\x20Sprite\x20Move\x20Duration",
    "___BattleManager_startInput___",
    "otbSetTurnPreviewItem",
    "concat",
    "_bigAppearance",
    "YEP_InstantCast",
    "isDead",
    "canInput",
    "isEnemy",
    "update",
    "AddedActionTimes",
    "___Game_Party_removeActor___",
    "isSideView",
    "_scene",
    "consumeItem",
    "otbInsertRevivalActionOrders",
    "makeActionTimes",
    "onTurnEnd",
    "otbInfinityClamp",
    "___Game_Battler_isUndecided___",
    "OTB\x20Mechanics\x20Enable\x20Party\x20Window",
    "___BattleManager_getNextSubject___",
    "_otbTurnPreview",
    "otb",
    "addState",
    "Game_Enemy_battlerName",
    "_back2Sprite",
    "applyOTBEffect",
    "_activeOTBActor",
    "createBattlerSprite",
    "addLoadListener",
    "_requestCurrentTurnSpriteReorder",
    "isBattleSystem",
    "setPreview",
    "EscapeActorWindow",
    "updateWindowPosition",
    "boxWidth",
    "___Game_Action_applyItemUserEffect___",
    "_processingForcedAction",
    "agi",
    "updateOpacity",
    "RemoveRestrictCurrent",
    "CurrentTurnText",
    "_otbBuffDebuffAgiConvert",
    "_hidden",
    "Param",
    "_x2",
    "call",
    "allBattleMembers",
    "item",
    "shift",
    "PartyShowBattle",
    "___Game_Battler_onBattleEnd___",
    "_subjectSprite",
    "push",
    "updateNextTurnPreviewTargets",
    "___Game_Battler_makeSpeed___",
    "___Game_Battler_customEffectEval___",
    "resetFontSettings",
    "_context",
    "_tempBattler",
    "printError",
    "loadSvEnemy",
    "_battlerSprite",
    "___Window_BattleSkill_initialize___",
    "standardPadding",
    "StatusWidth",
    "OTB\x20Background\x20Enemy\x20Color",
    "BECSystem",
    "characterName",
    "_helpWindow",
    "_otbDisplayWindow",
    "drawText",
    "isUndecided",
    "min",
    "speed",
    "updatePosition",
    "OTB\x20Mechanics\x20Stun\x20Wakeup\x20First",
    "_updateReady",
    "OTB\x20Mechanics\x20Action\x20Time\x20Order\x20Randomize",
    "_preForcePhase",
    "clearActor",
    "otbAddActionTimes",
    "_battlerName",
    "otbClearTurnPreview",
    "bitmap",
    "_setDirty",
    "speedOTB",
    "_largeScale",
    "_opacityRate",
    "onAllActionsEnd",
    "makeSpeed",
    "battlerHue",
    "guard",
    "otbNextTurnChange",
    "deactivate",
    "addWindow",
    "isActor",
    "otbPostPartySwitch",
    "___BattleManager_startTurn___",
    "customEffectEval",
    "OTB\x20Mechanics\x20Remove\x20Restrict\x20Current",
    "StunWakeUpFirst",
    "_moveDuration",
    "KELYEP_DragonBones",
    "isAlive",
    "spriteStepBack",
    "OTB\x20Display\x20Next\x20Text",
    "_otbInstantCast",
    "setupBattlerBitmap",
    "select",
    "setupWindowConstants",
    "scale",
    "_disposedSprites",
    "otbClearActionOrdersOfUnableBattlers",
    "addChildAt",
    "StunWakeUpClamp",
    "_previewItem",
    "changeActor",
    "paySkillCost",
    "StaticAgiCalculation",
    "otbAddActionCost",
    "_subject",
    "createNewSprites",
    "otbAddBattler",
    "_helpMoveSpeed",
    "displayEscapeFailureMessage",
    "EnablePartyWindow",
    "endBattle",
    "loadEnemy",
    "match",
    "postPartySwitch",
    "makeActions",
    "bind",
    "otbActionTimesModification",
    "isReplacedByDragonBonesBattler",
    "contains",
    "createActorCommandWindow",
    "___Game_BattlerBase_appear___",
    "___InstantBattleManager_startAction___",
    "initMembers",
    "clamp",
    "otbTurnShiftCost",
    "___BattleManager_forceAction___",
    "prototype",
    "EFFECT_ADD_BUFF",
    "otbForceAction",
    "dimColor1",
    "constructor",
    "Actor\x20",
    "setBattler",
    "_background2Sprite",
    "___Game_Battler_removeState___",
    "___BattleManager_selectNextCommand___",
    "savePreForceActionSettings",
    "stroke",
    "<OTB\x20Target\x20Next\x20Turn:\x20+1>",
    "OTB\x20Mechanics\x20Static\x20AGI\x20Calculation",
    "guardSkillId",
    "___Game_Battler_performActionEnd___",
    "_nextTurnSprites",
    "_previewSprites",
    "BackgroundActorColor",
    "createBackground2Sprite",
    "___Scene_Battle_commandEscape___",
    "updateZCoordinates",
    "OTB\x20Display\x20Help\x20Window\x20Move\x20Y",
    "moveTo",
    "HelpWindowMoveY",
    "NextTurnFontSize",
    "sort",
    "___BattleManager_displayEscapeFailureMessage___",
    "children",
    "Window_Selectable_deactivate",
    "_selectionEffectCount",
    "round",
    "rgba(255,\x20255,\x20255,\x201)",
    "otbInstanceName",
    "___Game_Action_speed___",
    "isDTB",
    "HelpWindowNewY",
    "_disposeState",
    "ActiveBattlerMove",
    "detectOtbInstantCast",
    "otbInsertActionOrderAtEnd",
    "removeCurrentAction",
    "OTB\x20Display\x20Current\x20Size",
    "_targetX",
    "inputtingAction",
    "isInstantCast",
    "___Window_ActorCommand_makeCommandList___",
    "_previewMode",
    "note",
    "restore",
    "actorId",
    "_actor",
    "randomInt",
    "_iconWidth",
    "battlerName",
    "updateNextTurnPreviewClear",
    "processTurn",
    "_startedInstantCasting",
    "makeDeepCopy",
    "subject",
    "_actions",
    "ActionSpeedConvert",
    "code",
    "_requestNextTurnPreviewClear",
    "giveTurnSpritesToNewArray",
    "otbInsertRevivalActionOrder",
    "updateBattlerBitmap",
    "SelectBattlerMove",
    "startOTBInput",
    "left",
    "opacity",
    "fill",
    "_requestNextTurnSpriteReorder",
    "_battler",
    "updateMovement",
    "isOTB",
    "canMove",
    "isTurnBased",
    "setBPSubject",
    "removeActor",
    "battleFieldDepthCompare",
    "drawOutlinePolygon",
    "otbSetSubject",
    "Window_ActorCommand_initialize",
    "OTB\x20Log\x20Window\x20Y",
    "otbRemoveBattler",
    "checkDragonbones",
    "attack",
    "updateNextTurnPreview",
    "YEP_BattleEngineCore",
    "updateSelectionEffect",
    "lineHeight",
    "cancel",
    "applyItemUserEffect",
    "endAction",
    "___Window_BattleEnemy_initialize___",
    "otbDisplayWindow",
    "OpacitySpeed",
    "effects",
    "drawBackgroundText",
    "setupVariableConstants",
    "___BattleManager_endBattle___",
    "setBlendColor",
    "Enabled",
    "otbCreateTurnPreview",
    "_actors",
    "___Window_Selectable_select___",
    "___BattleManager_initMembers___",
    "updateTurnSpriteLocations",
    "___Game_Battler_addState___",
    "getSpritePriority",
    "appear",
    "Battle",
    "_instantCasting",
    "_x1",
    "actor",
    "___Game_Battler_onBattleStart___",
    "___InstantBattleManager_endAction___",
    "_requestCurrentTurnUpdate",
    "save",
    "NextTurnText",
    "YEP_PartySystem",
    "fillStyle",
    "refresh",
    "initialize",
    "OTB\x20Display\x20Help\x20Window\x20Move\x20Speed",
    "createOTBDisplayWindow",
    "lineWidth",
    "filter",
    "RemoveRestrictNext",
    "___Scene_Battle_postPartySwitch___",
    "height",
    "indexOf",
    "MoveDuration",
    "attackSkillId",
    "updateNextTurnPreviewUser",
    "stop",
    "SideBattleUI",
    "setHandler",
    "updateReorderSprites",
    "___Scene_Battle_createActorCommandWindow___",
    "otbCheckIfBattlerIsUnable",
    "dataId",
    "width",
    "OTB\x20Mechanics\x20Added\x20Action\x20Times",
    "apply",
    "changePaintOpacity",
    "DisplayX",
    "loadBattlerSpriteBitmap",
    "___Game_Party_addActor___",
    "onBattleEnd",
    "floor",
    "OTB\x20Help\x20Window\x20Y",
    "makeActionOrders",
    "inBattle",
    "_actionForcedBattler",
    "create",
    "_sourceArray",
    "getAllIndices",
    "turn",
];

But again, I've only ever seen it talked about on the forums in js plain, so I don't know if this is a me thing.
 
Last edited:

Cormorant42

Veteran
Veteran
Joined
Sep 17, 2019
Messages
114
Reaction score
54
First Language
English
Primarily Uses
RMMV
Honestly I haven't come across anything like that in JS, but if I were to hazard a guess I'd say that it's a form of custom encryption / data theft prevention to keep people from stealing code and passing it off as their own. Your assumption is partially right, as some of the code in the first example is pulling from an array similar to the one in the second example (but not that exact array, which you can tell because variable 0x380f is never referenced in the first code block), but the rest of it is just basic text that has been converted to hexadecimal. It'll take some time, but you're going to have to go through each string and run it through a hexadecimal translator to figure out what it says.

Idk if you'll have to do the same for variables, but probably so. Sorry, wish I had an easier answer lol.

Edit: now that I think about it, there's probably some javascript-to-hexadecimal conversion system that she used to do this...the exception would be if she's certifiably insane and coded it in hexadecimal to begin with. If you can find that system and reverse it, that could solve it for you.
 

zerobeat032

Oh, it's that Zerobeat kid...
Veteran
Joined
Mar 28, 2014
Messages
495
Reaction score
1,200
First Language
English
Primarily Uses
RMMV
when did you get this??? because yeah... mines isn't like that at all... I'd show it but I doubt I have permission to do such I guess? But I do know that stuff started looking like that with newer plugins I purchased from Olivia, so I'm not sure she double backed and changed how the code is presented or what. but that's definitely NOT how mines looks.
 

Catog

Professional Internal Screamer
Veteran
Joined
Feb 9, 2016
Messages
76
Reaction score
27
First Language
English
Primarily Uses
RMMV
when did you get this???

Ah, yes - this is the newest update. I looked back at an old backup, and turns out that she definitely encrypted this stuff after the fact. Mystery solved.

Odd that she would encrypt it while still allowing code editing in the permissions on the download page. I might need to message her about that.
 

zerobeat032

Oh, it's that Zerobeat kid...
Veteran
Joined
Mar 28, 2014
Messages
495
Reaction score
1,200
First Language
English
Primarily Uses
RMMV
ahh that's a bummer... yeah, I'd noticed when I bought the Aggro plugin it was encrypted... I didn't know she went back and did that to older ones.
 

nio kasgami

VampCat
Veteran
Joined
May 21, 2013
Messages
8,982
Reaction score
3,119
First Language
French
Primarily Uses
RMMV
Ah, yes - this is the newest update. I looked back at an old backup, and turns out that she definitely encrypted this stuff after the fact. Mystery solved.

Odd that she would encrypt it while still allowing code editing in the permissions on the download page. I might need to message her about that.
it's being over zaelous aka paranoia to over encrypt code like that but she might had used her own built-in encrypter compiler to do that.
Or she SIMPLY obfuscates her code using uglify or some compiler. Which both protect and minify the code for being optimal. You should just ask her if you can get an non obfuscated version so you can edit.

yep she used this :
 

KoriCongo

Villager
Member
Joined
Jul 19, 2012
Messages
27
Reaction score
27
First Language
English
Primarily Uses
Huh, so that's why no one was able to get rid of the gaudy initiative bar after all these years.
I wish I kept the unencrypted version, but a hard drive failure said "No" to that...

Would love to see at least some way to move it about, would like to use it with Luna Engine.
 

MikeMakes

Veteran
Veteran
Joined
Sep 30, 2015
Messages
215
Reaction score
50
First Language
English
Primarily Uses
Has anyone been able to get a hold of Olivia for support?
 

MikeMakes

Veteran
Veteran
Joined
Sep 30, 2015
Messages
215
Reaction score
50
First Language
English
Primarily Uses
Couldn't get her friend request on Discord to start a convo nor find a link on her itch.io.

Couldn't even find contact for Irina, her partner.
 

Latest Threads

Latest Profile Posts

Signing divorce papers today. Still makes no sense to me that this is a step I need to take to get my hubby the help he needs and deserves :( Life is strange people and sometimes it throws you a curve ball you have no chance in hell of catching
Just laid down a sick nasty new post in the MagiCats! Infinite Sadness thread! Lemme give ya a big ol' hug for it.

bg6.jpg
MacAdams wrote on Frogboy's profile.
Hey is there an MZ set of D&D style plugins yet?
Wheel of Attacks.png

MORE GAMBLING THEMED ATTACKS!

I AM UNABLE TO STOP!
Is it ok to repost stuff that i've posted to threads in the status feed?
If so, here's art of Shiloh, the main protagonist of the game i'm making:20220807_181702.jpg
They are meant to be ambiguous in gender, like Frisk from Undertale or Gogo from FFVI. I haven't decided what their age will be yet. Any ideas?
Please comment what you think about the art and design!

Forum statistics

Threads
124,468
Messages
1,163,880
Members
163,294
Latest member
Monochrome4992
Top