RP and RepeatPan's mods

Heh, I’ve got an ‘non-mod’ idea. @RepeatPan, how about an interview for Stonehearth.pl ? :slight_smile:

In related news, I’ve started working on porting over the mods to 2200. The new get_config feature might be really handy, however I don’t like their default implementation :smiley:

RP will likely have rp.load_config heavily modified and rp.get_config will simulate radiant.util.get_config, but checks for type-safety.

Well, as long as it’s not in Polish and too personal, sure I guess?

No problem, interview will be in English, then translated. Give me 2-3 days to write some questions. :slight_smile:

1 Like

Currently writing a newer version of TIM. This time, it’s going to place the banner and all that stuff too, so you just load the game and have the same map every time, already prepared for fun.


In theory, some sort of very, very simple saving system that keeps at least track of the entities should be possible. I mean, we can query entities and we can save and load json, and we can create entities, so hmmmmm…

Just thinking loud.

1 Like

Think aloud as much as you need.

I have no understanding of what this means, but I’m excited that there are people who are delving into it! :stuck_out_tongue:

1 Like

it’s ok, i’ll explain it later, over drinks…

carry on @RepeatPan… and know this, i fully intend to crack open some code this weekend… i make no promises as to the feats i will accomplish, but be prepared to be (almost entirely) underwhelmed…

1 Like

I’ve just discovered how decoda works and my mind is officially blown.

If only I could get the Javascript console too. Then I could die a happy man. And probably release three times as many mods. Including configurable hotkeys for the camera… tease tease beg beg.

4 Likes

RP r2300, except the completely incompatible config handling nothing really new. Link as usual on GitHub; however those two things might be handy:

A Developer’s Dream

I’m sure Radiant has something like this too that they don’t want to share (I’m looking at you, ?skip_title!) so I decided we do a bit of a teenage rebellion and make my own. I’m not a part of the system, maan! This simply changes the world generation a bit to always create the exact same piece of land, auto-places the banner and auto-places a stockpile. In combination with Time Is Money, you get instantly loaded into a little island with settlers and everything ready. Note that this mod is kind-of in development right now and therefore other mods won’t necessarily work (for example, I know that rp_spawn_stuff disagrees - I have to see if I can call dlmenu on already dlmenu'd things).

rp_hotfix

I’m not even going to bother with this one; it’s whatever hotfixes the current game requires. At the moment, this is just an addition for the camera to add customizable key bindings. Example setting for the user_settings.json:

"mods" : {    
  "rp_hotfix" : {
    "camera_keys" : {
      "forward" : "Z",
      "backwards" : "S",
      "left" : "Q",
      "right" : "D",
      "turn_left" : "A",
      "turn_right" : "E"
    }
  }
}

In other news, post #100 in this thread \o/

2 Likes

Hi all, I had some issues to get the Spawn Items working. I never got the extra row in the menu to spawn items when using the latest version of RP loader. But when I stepped back and used the 2200 with all mods for r22, it worked.

In any way, here is my mod test video. I have not had the time to do a big creative build yet, but I will :smiley:

Video in unlisted mode when writing this, will be official on my channel tomorrow (saturday).

Looks neat. That the Spawn entry did not appear is an issue I’m currently trying to fix… It’s a bit difficult though. The library they’ve chosen is kind of… errr… not handsome? Adding new items when the menu has already been “enchanted” with the evil JS magic seems to not work at all. I’m trying to figure out how to bypass that since we don’t have any kind of proper JS loading (and sadly, much less power than in lua. :frowning:)

I’ll add it to the list of spotlights.

Edit: Good news! I found a solution, I think. Bad news: I really, really hate it.

Alpha 27 didn’t bring any changes in the lua, so we’re good.

For those that encountered errors/non-working spawn menus, I’ve got a dev build of rp and rp_spawn_stuff that could be tested. In theory, the evil hack I’m using should make it possible to add/modify the start menu at any time, it works quite nice so far but a broader audience can’t hurt.

And with this I call it a night. Tomorrow we’ll probably see the pattern-replacement-thingy for alternate naming (now that the start menu bug is hopefully dead) and perhaps some sort of simple mod interface. Remember that I have absolutely zero graphical skills, so prepare some eyebleach.

1 Like

Updates, kind of. Requires the git version, I’m not going to smod these:

  • rp_hotfix adds a new option called mods.rp_hotfix.enable_mouse_panning which re-enables the old drag-to-scroll behaviour.
  • As requested by @phoriist (and a few others I think?), the json for alternate naming has been changed. It’s now ""gender" : { "parts" : [ old list as before ], "replacements" : [ [ "search", "replace" ], ... ] }. I’ve updated ascendies with a few nonsense rules. See a few examples of the names below. (Personal favourite I think: “Hookol Forsddon, Dork Lord of Oll”)
  • Alternate naming has an option to dump names now, too. By specifiying dump inside the config block, you can set an amount of names to be dumped. Example config attached below.
  • I realize that the new config dealing is sub-optimal. It’s more complicated to share configurations right now, which is something I want to avoid. Concentrating the options does make sense, however. I’ll figure something out.

1 Like

What do you mean by an interface? Like a modpicker? And I’ll improve any ui based graphics you want (or that actually look bad) as it’s one of the few bits of graphics I can kinda do, still practicing with icons though and haven’t got them quite down yet.

I modified the hotfix to pan when the mouse gets within 20px of an edge in theory. In actuality it is giving errors that _radiant.client is nil and stops the lua from working. Line 24 to be precise. Any ideas?

1 Like

I imagine a new button in the main menu that reads “Mods” or something, which takes you to an interface. There you can enable and disable any (rp-)mod (might needs a restart to take effect, but better than nothing right?), read the description/icons of mods and so forth.

If that works, I would add a new option, which would allow users to configure the mods from within the window. Mods could have their own view (that’s how Ember works…?) that is then loaded to configure it. The changes are then saved back into the user_settings.json.

You’re calling this on the server side, I guess. Also, I found a few interesting strings in the binary:

.rdata:00F61310 00000007 C screen
.rdata:00F61318 0000000A C get_width
.rdata:00F61324 0000000B C get_height

That means likely somewhere around _radiant.renderer.scene, there’s a screen object floating around with those two functions. I’ll have to brute-force a little to find it.

Edit: Dear Jesus, I think I love decoda. _radiant.renderer.screen has two functions, get_width and get_height. Returns 1916x1054 for me, which seems to be the game view.

Let me guess:

“[aeiu]” - any of that characters ( Abelard )
“s$” - character and all after it ( Oswald )
“t” - exactly that character ( Mystia )

I need to know it for updating :stuck_out_tongue_winking_eye:

Wrong. For a comprehensive guide, check out the lua handbook.

Short:

  • $: end of the string (special character), same as ^ (beginning of the string)
  • [aeiou]: any of the characters
  • [a-f]: a, b, c, d, e, f
  • t: any character
  • t+: one or more t (as many as possible)
  • t-: one or more t (as few as possible)
  • . : any character
  • t* : zero or more t (as many as possible)
  • a? : zero or one a

And technically, you can catch-and repeat too, so captures is another chapter you should check out. For example, ["([aeiou])", "%1%1"] would double every vowel.

Remember that this is case sensitive, i.e. “a” is not “A”.

For restarts just do what I suggested and get it disable/enable then reopen the game with a execute command.

That fixed it for the client bug, now I’ve just got to figure out why calling it isn’t working. rp.log is still the same on the lua side right?

Yeah. JS logs into the stonehearth_mod_server.log, the client side (where Camera stuff happens) into stonehearth_mod.log.

I’m currently working on a side-scrolling implementation and it works quite smooth.

I’ll have to take a look to see what you did later then as mine seems to work fine except for the no scrolling part.

On an unrelated note I just noticed that you have a title.

You’re next on the list, don’t you worry :wink: