Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

I'm creating a mod that allows a mod pack author to create a book in minecraft.  The book can contain images which are specified by the mod pack author via a configuration file.

 

The configuration has a list of pages, each page has an image file name and information like margin size and other layout properties.  My problem is the standard forge configuration format doesn't seem to support arrays in this way.

 

I realize you can still have nested configuration like:

 

page.page1

page.page2

page.page3

 

But I would prefer a style of:

 

pages

{

  { [properties for page 1] }

  { [properties for page 2] }

  etc.

}

 

Where the user doesn't need to name each section explicitly using 'page1', 'page2' etc..  Just because it adds a burden to the user when they want to shift pages around.

 

So i've implemented it in Json instead but I would prefer to use normal forge config files for 2 reasons:

 

1. Forge configuration style is standard across nearly all mods.

2. Json doesn't allow comments, incredibly.

 

Let me know if that was too vague.

Categories, what you want is called categories.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

  • Author

Firstly I apologize for initially posting in the wrong forum.

 

I tried looking through the category code for forge, and also example configs, but couldn't find a way to do it apart from forcing the user to label each category with a unique name.

 

For example if they want 8 pages in the book they would have to make 8 categories with unique names:

 

category1:

category2:

...

category8:

 

What I am after is a way for them to create an 'array' of categories where the name is not required.  So:

 

pages:

{ page 1 configuration data}

{ page 2 configuration data}

...

{ page 8 configuration data}

 

In the latter case they can just rearrange the pages without the need to rename every category (which could get annoying for a 50 page book).

Yes, it has to be unique names.

There is no object nesting. The forge config system is VERY basic {but a fucking hell to maintain code wise u.u never touching it again if i can help it}

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.