SMBX 1.4.2 Compatibility

Description: Report bugs and ask questions regarding PGE here.
Forum rules: Here you can ask any question related to PGE Project components:


Any questions related to LunaLUA project please ask HERE (LunaLUA subsection)
Any questions related to SMBX-38A (1.4.x) Chinese project please ask HERE (SMBX-38A subsection)
Moderators: Moderators, Semi-moderatos

Yoshi021 M
Topic author, Moderator
Moderator
Avatar
Yoshi021 M
Topic author, Moderator
Moderator
Age: 18
Reputation: 120
Posts: 667
Joined: 15 Feb 2016
Location: Yoshi's Island

Post #1by Yoshi021 » 4 Jun 2016, 0:04

Whenever I try to open levels in PGE of 1.4.2 different thing can happen. In some levels random elements go missing, sometimes only NCPs are missing, or it opens perfectly fine. I understand that PGE does not have full compatibility with 1.4, but what can I do to open 1.4 levels in PGE without elements going missing. Also, I noticed that when deleting the new NPCs (example: starcoins) PGE loads more thing.
Links
ImageImageImage
Image
Image
"Going to University is FUN!" :pardon:

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 26
Reputation: 372
Posts: 1345
Joined: 15 Feb 2014
Location: Moscow, Russia
Website Skype YouTube

Post #2by Wohlstand » 4 Jun 2016, 0:37

You have a trouble because:
1) previous released version of PGE with support of R/W for SMBX-38A levels (except laboratory version where I have fixed lots of bugs in PGE File Library include accurate support of SMBX-38A levels) has some bugs in PGE File Library which results inaccurate result
2) Common configuration packages which are going with PGE are lacks most of SMBX-38A-specific elements:

"SMBX 1.3" Config pack and it's forks like A2XT and others mainly are used in PGE, contains stuff that was in last official SMBX version 1.3 by Redigit. SMBX 1.4.2 contains lot of other elements which are wasn't existed in SMBX 1.3. It is not problem for PGE, you just can exchange config pack yourself: each INI-file contains a count number of "supported" elements of each type and then you must declare properties for every element:

Code: Select all

[xxx-main]
total=10

[xxx-1]
...

[xxx-2]
....
....
[xxx-10]

Just increase "total" value and then copy-paste bottom elements and set necessary properties for a new-added SMBX-38A elements. For NPC's to play them in PGE Engine, needed a lua-script with AI script or without script those NPCs are will act like goombas, coins or bricks.

Full reference to config pack's INI files is here:
http://wohlsoft.ru/pgewiki/Game_Configuration_Pack_References (but note that some properties may outdate or added in laboratory version which will came later when all current imperfections are will be completed)
To speed-up work you can copy-paste elements from others, but don't forget to change: name, ID in the section title, image filename, and ok, I think, I'll reorganize something in config packs to:
- support of splited INI configs per every element instead of huge nested INI-files
- make config pack with support of SMBX-38A specific elements to don't lack those properties.

About SMBX-38A specific controls:
Internally I implemented all parameters of SMBX-38A file format and there are successfully saving into LVLX file format with no data lost, but editing of most of them is not implemented yet in GUI side, except of some things.

Yoshi021 M
Topic author, Moderator
Moderator
Avatar
Yoshi021 M
Topic author, Moderator
Moderator
Age: 18
Reputation: 120
Posts: 667
Joined: 15 Feb 2016
Location: Yoshi's Island

Post #3by Yoshi021 » 4 Jun 2016, 4:23

Okay, so I opened the lvl_npc.ini in the configuration folder and added NPCs all the way to NPC-341. If I place any of these NPCs an open it with 1.4.2, it will turn to the correct NPC. My problem would be that PGE right now sometimes loads NPCs. I have one level in which it does loads NPCs and NPCs 293-341 will turn into a the dummy I added, but on the other levels it simply doesn't work.

Code: Select all

total=341       ;total=341 - valid NPC's, next NPC's are dummy

[npc-341]
name="Dummy NPC #341"
group="Miscellaneous"
category="Dummy NPCs"      ;The sort category
image="npc-300.gif"      ;NPC Image file
algorithm=""
default-effect=2      ;Spawn effect ID on jump-die
shell-effect=4         ;effect on kick by shell or other NPC
; graphics
gfx-offset-x=0
gfx-offset-y=0
gfx-height=32
gfx-width=32
physical-height=32
physical-width=32
physics-to-gfx=1      ; 1|0 Allow overwrite GFX values by physics set. Default 1
grid=16
grid-offset-x=0
grid-offset-y=0
frame-style=0   ; (0-2) This option in some algorithms can be ignored
frames=1
frame-speed=128
foreground=0
animation-direction=0      ; 0 - direct sequence, 1 - reverse frame sequence
animation-bidirectional=0   ; Bidirectional animation
custom-animation=0
container=0         ; NPC can contain another NPC inside itself which is released when it dies
contents-id=0         ; ID of contained NPC
have-special=0         ; Special NPC's option, what can used by NPC's algorithm
score=2            ; Add scores to player (value 0-13)
; 0, 10, 100, 200, 400, 800, 1000, 2000, 4000, 8000, 1up, 2up, 5up, 3up
speed=64         ; Default movement speed in px/s
moving=1         ; NPC simply moving right/left
scenery=0         ; NPC as block
shared-animation=0              ; NPC uses same animation independent to body
activity=1                      ; It's active living NPC (not a thing or not a dumb wooden stick!)
immortal=0         ; NPC Can't be destroy
yoshicaneat=1         ; NPC can be eaten by yoshi
takable=0         ; NPC destroyble on contact with player
grab-side=0         ; NPC can be grabbed on side
grab-top=0         ; NPC can be grabbed on top
grab-any=0         ; NPC can be grabbed on any collisions
default-health=1      ; NPC's health value
collision-blocks=1
gravity=1
hurtplayer=1         ; Hurt player on contact
hurtnpc=0         ; Hurt other npc on contact
kill-slside=0
kill-onjump=0
kill-bynpc=0
kill-fireball=0
kill-iceball=0
kill-hammer=0
kill-tail=0
kill-spin=0
kill-statue=0
kill-with-mounted=0
kill-on-eat=0
cliffturn=0
lava-protection=1
;default-friendly=1      ; Set default value of friendly flag (0/1)
;default-no-movable=1      ; Set default value of no-movable flag (0/1)
;default-is-boss=1      ; Set default value of is-boss flag (0/1)
;default-special-value=0   ; Set default value of special value for NPC (any signed integer)

 


phpBB [youtube]

Original link: https://youtu.be/_4J9cynx8tA

Links
ImageImageImage
Image
Image
"Going to University is FUN!" :pardon:

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 26
Reputation: 372
Posts: 1345
Joined: 15 Feb 2014
Location: Moscow, Russia
Website Skype YouTube

Post #4by Wohlstand » 4 Jun 2016, 13:11

You also need to put right default graphics into the "data/graphics/level/npc"
(You even can convert everything into png with GIFs2PNG, but also you must rename that in all INI-files)

Also hints for lvl_npc.ini editing:
- When you increased number of NPC's, you must have [npc-293]....[npc-343] sections for every next NPC at the bottom
- you must replace all ".gif" to ".png" and put all stuff from SMBX-38a folder into "data/graphics/level/npc" folder to don't take "graphics not found" errors while editor loading
- You must change name of every NPC in the new-made sections, each NPC has own name, and that is very useful to find and identify them through filter
- You must change "image=" field to have right filenames of new-made NPC entries (but npc.txt of PGE allows image filename customizing [image="caterpillar.png"])
- you can comment gfx-width/gfc-height fields because there are will be automatically calculated by framestyle and frames count (framestyle-0 results height equal to height divided to freames, framestyle-1 - half of height divided to frames count, framestyle-2 - quarter of height divided to frames count, etc.), also don't forget about grid size / grid offsets / grid aligns to have correctly aligned NPC in the editor

Yoshi021 M
Topic author, Moderator
Moderator
Avatar
Yoshi021 M
Topic author, Moderator
Moderator
Age: 18
Reputation: 120
Posts: 667
Joined: 15 Feb 2016
Location: Yoshi's Island

Post #5by Yoshi021 » 6 Jun 2016, 22:19

I have made some progress. I am right now using the graphics in gif. format, but I will make it into png. later. I also made the the start-up screen.
Spoiler
Image
Image
Image
Image
Image
Links
ImageImageImage
Image
Image
"Going to University is FUN!" :pardon:

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 26
Reputation: 372
Posts: 1345
Joined: 15 Feb 2014
Location: Moscow, Russia
Website Skype YouTube

Post #6by Wohlstand » 6 Jun 2016, 23:15

Yoshi021 wrote:I have made some progress. I am right now using the graphics in gif. format, but I will make it into png. later. I also made the the start-up screen.
Spoiler
Image
Image
Image
Image
Image
Good job ;-)

Anyway conversion into PNG is easy:
1) run this command from PGE folder

Code: Select all

GIFs2PNG -W configs/SMBX38A/

2) then replace all ".gif" to ".png" inside all INI-files of that config pack

Also since 38A allowed interprocessing features, it is possible me to implement direct communication with SMBX38a Engine to do instant level starting and real-time editing (placing elements selected in PGE Editor, and even enabling rubber, etc.) like already implemented with PGE Engine and partially with LunaLUA (only launching or relaunching updated level data without saving to the disk).

Yoshi021 M
Topic author, Moderator
Moderator
Avatar
Yoshi021 M
Topic author, Moderator
Moderator
Age: 18
Reputation: 120
Posts: 667
Joined: 15 Feb 2016
Location: Yoshi's Island

Post #7by Yoshi021 » 9 Jun 2016, 23:26

With the laboratory build, I got this message when testing. How do I fix this?
Image
Links
ImageImageImage
Image
Image
"Going to University is FUN!" :pardon:

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 26
Reputation: 372
Posts: 1345
Joined: 15 Feb 2014
Location: Moscow, Russia
Website Skype YouTube

Post #8by Wohlstand » 10 Jun 2016, 1:17

Just edit main.ini and change Editor's and Engine's version number.
On next update I made lot of changes into official configs include more NPC-AI scripts and fixed settings. Also lua errors are possible if different versions are has modified lua-api parts. Anyway, patch for SMBX 1.3 config pack is always available to download (but since are are sets of dummies has been added, also need to generate images for all new-added dummies)

Yoshi021 M
Topic author, Moderator
Moderator
Avatar
Yoshi021 M
Topic author, Moderator
Moderator
Age: 18
Reputation: 120
Posts: 667
Joined: 15 Feb 2016
Location: Yoshi's Island

Post #9by Yoshi021 » 12 Jun 2016, 3:51

I deleted all the dummies since 1.4 won't need them.

I will soon release the configuration pack. The only problem is that I still have not set correct NPC flags to the NPCs so they all behave as a Dummy NPC. I will also need someone to the lua scrips, but hopefully with the 1.4 integration it won't be needed.

I have a quick question, what is "Misc_World_Paths_vertical.tileset"? "Misc_World_Paths" seems to work fine so I do not know what to do with that.

Also, I would like you to check it and see if you find ways to improve it.
Links
ImageImageImage
Image
Image
"Going to University is FUN!" :pardon:

Wohlstand M
Lead Developer
Lead Developer
Avatar
Wohlstand M
Lead Developer
Lead Developer
Age: 26
Reputation: 372
Posts: 1345
Joined: 15 Feb 2014
Location: Moscow, Russia
Website Skype YouTube

Post #10by Wohlstand » 12 Jun 2016, 11:54

Yoshi021 wrote:I deleted all the dummies since 1.4 won't need them.
Dummes are 1.3 specific and not needed for 1.4. Previously there are even wasn't added into 1.3 pack because undocumented, but found accidentally while hacking by h2643 and by Sednaiur. So, you did right.

Yoshi021 wrote:I will soon release the configuration pack. The only problem is that I still have not set correct NPC flags to the NPCs so they all behave as a Dummy NPC. I will also need someone to the lua scrips, but hopefully with the 1.4 integration it won't be needed.
Some hints:
  • GFX sizes you can don't define, just define only physical size and frames count with frame style and GFX sizes are will be calculated automatically, then there are can be remixed with npc.txt and there are will be shown as "default" in npc.txt editing box.
  • Grid align parameters sence is:
    Image.
    It's a default grid aligning position if grid offsets are zeroed. If you will modify them, NPC will be offseted relative this grid aligning position (when you placing that NPC, moving NPC in the editor, etc).
but parameters for extra NPC's I have from 38A, so, take them ;-)
npc parameters.txt
(7.13 KiB) Downloaded 66 times

Also because NPC-AI engine is not completed (also is not good documented yet), the source for supported / available functions and classes look into PGE Engine's source code here:
https://github.com/Wohlhabend-Networks/PGE-Project/tree/master/Engine/script/bindings
Open one of CPPs and fins something like "::bindToLua()", where you will see a list of binded classes/functions/members which are available for use.
I agree that it is not convenient, but currently that is optional or I will write LUAs for a new NPCs myself when I will finish main part of PGE Engine to take full support of SMBX 1.3 internal stuff to have a completed gameplay and lua API implementation. Extra features from SMBX-38A are easy to implement even now, internal side of PGE Engine even has some unique features which aren't in SMBX-38A. But as thing, you even can help me with implementing LUAs for a first NPCs set. To test that is easy: 1) make a dummy level (even don't save it, just put NPC which you wish to test and put player to the safe place), 2) define in npc.ini the lua filename in "algorithm" field of that NPC. 3) when you made something in lua, just press F5 in PGE Editor to test that. PGE Engine loads config pack include luas every level loading (even you will re-enter same level from world map or single-level run from main menu). Because it loads stuff dynamically, it loads only "needed now" stuff and other will be loaded on a first requiring.

Yoshi021 wrote:I have a quick question, what is "Misc_World_Paths_vertical.tileset"? "Misc_World_Paths" seems to work fine so I do not know what to do with that.
Vertical variant was been copy-pasted from global config of wld_paths.ini to have same as regular item box. But for tileset box that is not convenient, therefore I made horizontal version and attached it into tileset group.
Just use "Tools" -> "Palletes and tilesets" -> "Tileset editor" to edit global config specific tilesets.
And use "Tools" -> "Palletes and tilesets" -> "Tileset groups editor" to edit tileset groups.
Just hints: to make a new category, just create a tileset group with name of that. Category list is generating from unique "category" value fileds of every tileset group. There are merging and result is set of categories (category - is a tab in the tileset item box. Each group is shown in the combo-box list)

Yoshi021 wrote:Also, I would like you to check it and see if you find ways to improve it.
When i'll complete my relaxing from hard works at my job, I think to make support of splited global configs to don't have huge nested lvl_npc.ini or something and have separated npc-*.ini in subfolder for every different NPC (and other item types). Both variants are will be supported, because nested variant will be useful internally when generating a monolith game package (whilch will have everything pre-packed and no config pack is needed to play this game [but if single-episode pack type, config pack is required]).


Return to “Troubleshooting”

Who is online (over the past 5 minutes)

Users browsing this forum: 1 guest