Page 3 of 8

Re: [TOOL] SMBX NPC Code Editor (New!)

Posted: Wed Jul 16, 2014 12:23 pm
by Axiom
Try unchecking the framestyle and seeing what happens. It might be glitchy animation wise but if it sits still after you hit it you'll be able to know if that's what caused it.

Re: [TOOL] SMBX NPC Code Editor (New!)

Posted: Wed Jul 16, 2014 12:34 pm
by Mikepjr
It still does what it's doing.
I tried making everything default, and even exchanging the enemy sheet for the default, it does the same thing.. animates no matter what.
It was doing that long before i added the turn style as well.
I'm not sure what the deal is to be honest.

Re: [TOOL] SMBX NPC Code Editor (New!)

Posted: Wed Jul 16, 2014 12:36 pm
by FanofSMBX
It's the "frames=3" that causes it.

Re: [TOOL] SMBX NPC Code Editor (New!)

Posted: Wed Jul 16, 2014 12:49 pm
by Mikepjr
That's weird. Some sort of bug maybe? Or?
As far as i can tell... you just can't edit anything for these guys but a few things. That's kinda ridiculous.
So you can't change turn styles.. you can't change frames.. seems you can change everything else.
Maybe it's a bug or something?

Re: [TOOL] SMBX NPC Code Editor (New!)

Posted: Wed Jul 16, 2014 1:39 pm
by Axiom
Mikepjr wrote:That's weird. Some sort of bug maybe? Or?
As far as i can tell... you just can't edit anything for these guys but a few things. That's kinda ridiculous.
So you can't change turn styles.. you can't change frames.. seems you can change everything else.
Maybe it's a bug or something?
Moreso a limitation that sadly won't ever get fixed.

Re: [TOOL] SMBX NPC Code Editor (New!)

Posted: Wed Jul 16, 2014 1:49 pm
by FanofSMBX
Mikepjr wrote:That's weird. Some sort of bug maybe? Or?
As far as i can tell... you just can't edit anything for these guys but a few things. That's kinda ridiculous.
So you can't change turn styles.. you can't change frames.. seems you can change everything else.
Maybe it's a bug or something?
You CAN change the turn styles and frames, but SMBX isn't "smart" enough to realize that you want one frame to be the "still" frame. When you put "frames=3", it thinks "okay this has 3 frames that animate!"

Re: [TOOL] SMBX NPC Code Editor (New!)

Posted: Wed Jul 16, 2014 2:27 pm
by Axiom
FanofSMBX wrote:
Mikepjr wrote:That's weird. Some sort of bug maybe? Or?
As far as i can tell... you just can't edit anything for these guys but a few things. That's kinda ridiculous.
So you can't change turn styles.. you can't change frames.. seems you can change everything else.
Maybe it's a bug or something?
You CAN change the turn styles and frames, but SMBX isn't "smart" enough to realize that you want one frame to be the "still" frame. When you put "frames=3", it thinks "okay this has 3 frames that animate!"
Redigit was drunk when he coded SMBX so it's more like "Ohhhhhhkayyyy hehehehe 3 frames? Animaaaate *chug chug chug*"

Re: [TOOL] SMBX NPC Code Editor (New!)

Posted: Wed Jul 16, 2014 3:08 pm
by Mikepjr
Luigifan2010 wrote:Redigit was drunk when he coded SMBX so it's more like "Ohhhhhhkayyyy hehehehe 3 frames? Animaaaate *chug chug chug*"
Uh.. is it such a good idea to trash talk the guy who made this? O.o

Re: [TOOL] SMBX NPC Code Editor (New!)

Posted: Wed Jul 16, 2014 3:10 pm
by Axiom
It's not trash talk if it's

A - True
B - he doesn't even come close to the SMBX community anymore.
C - I can make neater code than him [sizzling intensifies]

Re: [TOOL] SMBX NPC Code Editor (New!)

Posted: Wed Jul 16, 2014 4:59 pm
by Axiom
You probably thought I was done with this
Well you thought wrong.
Welcome to the 1.3 update! Use the same download link from the first post to get it. This was alot more behind the scenes coding than anything but overall I'm extremely happy with what I've done. Changelog is as follows:
1.3 Changelog wrote:-Updated the UI to reflect the Windows 7/8 Desktop guidelines (segoe ui 9pt, white background, etc)
-Added a config file that contains every single NPC in SMBX. Now, you can find out what NPC this replaces and in the future this will have more functionality
-Changed the way reading is handled. It looks alot nicer now
So now some updated screenshots.

Image
Image

Re: [TOOL] SMBX NPC Code Editor (New!)

Posted: Thu Jul 17, 2014 6:15 am
by Mikepjr
Awesome but... it's giving me issues about my directory of where everything is.
I have it installed in E:\Program Files\SMBX and i guess that's an issue?

Ugh i am a MORON! I got it now .. oi veh..

Re: [TOOL] SMBX NPC Code Editor (New!)

Posted: Mon Jul 28, 2014 12:03 pm
by Fatoldsweaty
This looks very useful. better than the one I have nice job!

Re: [TOOL] SMBX NPC Code Editor (New!)

Posted: Mon Jul 28, 2014 3:11 pm
by Axiom
Fatoldsweaty wrote:This looks very useful. better than the one I have nice job!
what one do you have?

and oh crap this thread is outdated

Re: [TOOL] SMBX NPC Code Editor (New!)

Posted: Mon Jul 28, 2014 7:15 pm
by Fatoldsweaty
I got this old one, I didn't make it though Its just been around for awhile.

here it is if you wanna look at it.
http://www.mediafire.com/download/bkcd4 ... _Editor.7z

Re: [TOOL] SMBX NPC Code Editor (New!)

Posted: Mon Jul 28, 2014 8:22 pm
by Axiom
Thanks, I've been looking for it for memories sake ;)

Re: [TOOL] SMBX NPC Code Editor (New!)

Posted: Tue Jul 29, 2014 5:37 am
by Wohlstand
@Luigifan2010, please, fix the scores list:
0 - 13:
[0 10 100 200 400 800 1000 2000 4000 8000 1up 2up 3up 5up] - Forgotten 3up, I probbed in the SMBX and have proof of this.
Also SMBX's RTF file talking about them.
If I will add new npc.txt options, will write here:
http://engine.wohlnet.ru/docs/_sources/ ... c_txt.html

Also, take better animator, you can made similar on the C#:
https://github.com/Wohlhabend-Networks/ ... em_npc.cpp

this animator allows change frame size, image size, global NPC settings dynamically which giving possible to dynamically edit NPC's settings and display changes of them instantly.

Structures:
localProps - is a local copy of global NPC config, which merged with NPC.txt options.
npcData - contains the indifivual NPC settings which defined on the level map.

Functions:
setNpcData(LevelNPC inD)
Acceptor of level NPC's settings

setMainPixmap(const QPixmap &pixmap)
adding of image sprite into NPC item and auto-define of the offset by localProps structure.

changeDirection(int dir)
Switch direction image to left/right/randod (this function recreating animator for display new direction of NPC)

setAnimation(int frames, int framespeed, int framestyle, int direct,
bool customAni, int frFL, int frEL, int frFR, int frER, bool edit)


frames - frames number
framespeed - in milliseconds
direct - direction of NPC (-1 left, 0 - random, 1 - right)
customAni - set custom animation
frFL - First frame for left direction
frEL - Last frame for left direction (if -1 - animation will fetch all exist frames)
frFR - First frame for right direction
frER - Last frame for right direction (if -1 - animation will fetch all exist frames)
Note: "Last frame" value can be as "frame step" if defined algorithm "frame jump".
edit - flag must be false on first initialisation and true when you recreating animator of same NPC (change direction, redefine animator, etc)

createAnimationFrames()
Crop whole sprite into array of images which will be as frames

AnimationStart() / AnimationStop()
Start / stop animation of this NPC

setFrame(int y)
set frame with number (0 ... Last frame)

nextFrame()
This function calling by animation timer which switching frames by its animation algorithms

P.S. global and npc.txt's options must be merged by special formulas in the:
https://github.com/Wohlhabend-Networks/ ... xt.cpp#L67
obj_npc FileFormats::mergeNPCConfigs(obj_npc &global, NPCConfigFile &local, QSize captured)
this functions return the structure of global NPC's settings with applied the NPC.txt's settings
global - settings structure from global config
local - settings structore from npc.txt file
captured - image size (Height and Width) which gotten from user's folder

Re: [TOOL] SMBX NPC Code Editor (New!)

Posted: Thu Jul 31, 2014 8:38 am
by Axiom
The scores I will fix.

As for the animator, I don't see much of a point in "fixing it". It does a good enough job of emulating SMBX's animation times and this is only meant to be a small program used for quick editing anyway. Yours on the other hand is a huge game engine. In my spare time I guess I could play around with that though.

Re: [TOOL] SMBX NPC Code Editor (New!)

Posted: Thu Jul 31, 2014 4:06 pm
by Wohlstand
Luigifan2010 wrote:The scores I will fix.

As for the animator, I don't see much of a point in "fixing it". It does a good enough job of emulating SMBX's animation times and this is only meant to be a small program used for quick editing anyway. Yours on the other hand is a huge game engine. In my spare time I guess I could play around with that though.
But this small program making the accurate work. Each pixel is important. And rendering of target NPC important too: how same NPC will work inside a game. Animator can working without game/editor, but you need correctly use the INI file with NPCs. And all will be perfect ;)

Re: [TOOL] SMBX NPC Code Editor (New!)

Posted: Thu Jul 31, 2014 4:55 pm
by Axiom
Well in my spare time I could work on getting a general conversion reference down for this. like i believe framespeed=8 translates to roughly 128 ms in your ini file

Re: [TOOL] SMBX NPC Code Editor (New!)

Posted: Thu Jul 31, 2014 5:19 pm
by Wohlstand
Luigifan2010 wrote:Well in my spare time I could work on getting a general conversion reference down for this. like i believe framespeed=8 translates to roughly 128 ms in your ini file
Don't forget about frame speed formula:

St = Si / (8/Sx)

St -> Target framespeed
Si -> framespeed from INI (milliseconds)
Sx -> framespeed from npc.txt (modification coefficient)
8 - constant value. Means if "framespeed" from txt file will be 8, will be used ORIGINAL speed. I.e. from INI file. 8/8=1 => Si/1=Si

here I wrote ALL conversions from txt (local) to INI (global) values and merge them for get target:
https://github.com/Wohlhabend-Networks/ ... xt.cpp#L67
Note: some values can depend from each other and target value can be overwritten even in txt same value is not set. It is SMBX's standard, which I got by lot of tests.