SMBX NPC Code Editor [Final Tiebreaker Vote]

General discussion about Super Mario Bros. X.

Moderator: Userbase Moderators

Which icon will be in the next version of the SMBX Episode Manager? (see first post for details)

Poll ended at Sat Oct 25, 2014 8:26 am

Wohlstand
3
38%
Luigifan2010 (the original, currently used one)
5
63%
 
Total votes: 8
Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

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

Postby Axiom » Wed Jul 16, 2014 12:23 pm

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.

Mikepjr
Buster Beetle
Buster Beetle
Posts: 95
Joined: Mon Jun 16, 2014 1:55 am

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

Postby Mikepjr » Wed Jul 16, 2014 12:34 pm

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.

FanofSMBX
Ludwig von Koopa
Ludwig von Koopa
Posts: 3878
Joined: Sun Dec 22, 2013 12:01 pm

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

Postby FanofSMBX » Wed Jul 16, 2014 12:36 pm

It's the "frames=3" that causes it.

Mikepjr
Buster Beetle
Buster Beetle
Posts: 95
Joined: Mon Jun 16, 2014 1:55 am

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

Postby Mikepjr » Wed Jul 16, 2014 12:49 pm

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?

Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

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

Postby Axiom » Wed Jul 16, 2014 1:39 pm

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.

FanofSMBX
Ludwig von Koopa
Ludwig von Koopa
Posts: 3878
Joined: Sun Dec 22, 2013 12:01 pm

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

Postby FanofSMBX » Wed Jul 16, 2014 1:49 pm

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!"

Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

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

Postby Axiom » Wed Jul 16, 2014 2:27 pm

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*"

Mikepjr
Buster Beetle
Buster Beetle
Posts: 95
Joined: Mon Jun 16, 2014 1:55 am

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

Postby Mikepjr » Wed Jul 16, 2014 3:08 pm

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

Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

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

Postby Axiom » Wed Jul 16, 2014 3:10 pm

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]

Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

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

Postby Axiom » Wed Jul 16, 2014 4:59 pm

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

Mikepjr
Buster Beetle
Buster Beetle
Posts: 95
Joined: Mon Jun 16, 2014 1:55 am

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

Postby Mikepjr » Thu Jul 17, 2014 6:15 am

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..

Fatoldsweaty
Bot
Bot
Posts: 55
Joined: Mon Jan 06, 2014 6:22 pm

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

Postby Fatoldsweaty » Mon Jul 28, 2014 12:03 pm

This looks very useful. better than the one I have nice job!

Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

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

Postby Axiom » Mon Jul 28, 2014 3:11 pm

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

Fatoldsweaty
Bot
Bot
Posts: 55
Joined: Mon Jan 06, 2014 6:22 pm

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

Postby Fatoldsweaty » Mon Jul 28, 2014 7:15 pm

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

Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

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

Postby Axiom » Mon Jul 28, 2014 8:22 pm

Thanks, I've been looking for it for memories sake ;)

Wohlstand
Chargin' Chuck
Chargin' Chuck
Posts: 2008
Joined: Tue Feb 11, 2014 4:44 pm
Flair: [ˈvoːlˌʃtant], 狐エンジニア
Pronouns: he/him
Contact:

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

Postby Wohlstand » Tue Jul 29, 2014 5:37 am

@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

Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

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

Postby Axiom » Thu Jul 31, 2014 8:38 am

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.

Wohlstand
Chargin' Chuck
Chargin' Chuck
Posts: 2008
Joined: Tue Feb 11, 2014 4:44 pm
Flair: [ˈvoːlˌʃtant], 狐エンジニア
Pronouns: he/him
Contact:

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

Postby Wohlstand » Thu Jul 31, 2014 4:06 pm

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 ;)

Axiom
Phanto
Phanto
Posts: 1471
Joined: Tue Dec 24, 2013 2:23 pm

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

Postby Axiom » Thu Jul 31, 2014 4:55 pm

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

Wohlstand
Chargin' Chuck
Chargin' Chuck
Posts: 2008
Joined: Tue Feb 11, 2014 4:44 pm
Flair: [ˈvoːlˌʃtant], 狐エンジニア
Pronouns: he/him
Contact:

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

Postby Wohlstand » Thu Jul 31, 2014 5:19 pm

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.
Last edited by Wohlstand on Thu Jul 31, 2014 5:24 pm, edited 1 time in total.


Return to “General”

Who is online

Users browsing this forum: No registered users and 2 guests

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari