CarlZalph

  • Content Count

    2265
  • Joined

  • Last visited

Community Reputation

5406 Excellent

About CarlZalph

  • Rank
    Mastermind
...

Badges

Recent Profile Visitors

25272 profile views
  1. Every time I've seen this error it was caused by a mod not properly setting a prefab's pristine state.
  2. Did you verify that entity:Add* functions are all being done before the pristine state? Lights, Sounds, etc.
  3. From a quick test it looks like the RPC order is: RPC.LeftClick + ACTIONS.MINE.code, followed up by: RPC.LeftClick + ACTIONS.WALKTO.code. It's like the rock is ignored for a frame on the client and sends the walk command, so the server thinks the client is trying to constantly walk into the rock which takes priority over trying to mine the thing.
  4. That mod isn't setting the entity Pristine state correctly on a lot of prefabs. An overview: CreateEntity() entity:Add*() entity:SetPristine() <- Right before #4, not before #2. TheWorld.ismastersim check Server stuff. Just one example of it being set improperly:
  5. Does it go back further than this? It's been too long for my memory to recall the events clearly if I was there for when it came out from DS. Edit: Looks like it does, woo.
  6. The mod authors are likely setting the pristine state before adding collision on entities, they'll need to fix that up in their mods to have pristine state done properly. An overview: CreateEntity() entity:Add*() entity:SetPristine() <- Right before #4, not before #2. TheWorld.ismastersim check Server stuff.
  7. Wickerbottom's bird and sleep books use is a common strategy I see. Summon two waves of birds, knock 'em out, then have it.
  8. If all of the art assets matched up with their prefab names and such, then yes. They don't unfortunately. See: "nightsword" prefab having "nightmaresword" bank+build and "nightsword.tex" inventory icon with the in-game name "Dark Sword". If all you're after is just the prefab name and a readable text with no component information, then you might be able to get away with parsing strings.lua's STRINGS.NAMES table. This and the speech files will present names for non-inventory items. I'm still recommending writing a quick mod to export out what you're after rather than trying to parse the LUA without using LUA.
  9. The problem you're going to have with parsing these files is that LUA is a highly mutable language, and some of the prefabs take this for granted when generating out new prefabs. Take a look at scripts/prefabs/chesspieces.lua for example: A tokenizer won't be able to figure out what this is doing because it's missing key concepts in LUA's evaluation chain. Writing a sandbox to run the files and extract the information might be one route, binding LUA to Java, but I think that'll be painful trying to run the game's files without the engine. I'd think the easiest solution is to write a quick mod that generates your file for you with all of the game-context related goodies you want with it.
  10. Rain World and Tunic are the two most recent games that I could say, "Yeah, check 'em."
  11. I took a quick look at the parts for this in grass.lua and it looks like you'd need 6 gekkos (TUNING.GRASSGEKKO_MAX_DENSITY) within 20 units (TUNING.GRASSGEKKO_DENSITY_RANGE) for it to not pop out more. So for your setup, add in another 5 into the pen with a bigger pen to house the others to prevent more from popping out. Or I think there's a worldgen option to disable the gekkos entirely if you don't like them.
  12. @BombardmentPigs Tags are useful for labeling but they don't directly influence the behaviour of an entity. Indirectly they can be used by other parts of the code base like components to look for things with tags to then modify. In your case you're wanting to do a few things. Production of heat you can look at how the heatrock prefab makes the holder warm. It uses the heater component and uses the SetThermics function for controlling the properties of transference while manipulating the temperature degrees through the heater component's carriedheatfn callback. To cook food there's an item in the game that does this already: Willow's Lighter. It uses the cooker component. To produce light on a hat equip the miner hat already does what you're looking for. Look for 'minerhat' in prefabs/hats.lua for all of its relative handling and behaviour. When tags are added to the entity before the pristine state this is a networking optimization. Marking an entity as pristine means that both the server and client see the same thing. So since some of these components that get added provide the tag to the entity it's better for the client to also mark that the entity has the tag since clients don't (normally) have components on entities with which to receive these tags.
  13. TheWorld.event_listeners.ms_save = nil This will kill all saving in case you wanted that. There's another event you can do if you want to only do autosaving: TheWorld:PushEvent("ms_setautosaveenabled", false)
  14. Yeah, these functions that exist are sometimes helper wrapper functions while sometimes they're not used elsewhere. You can find these inside the component file itself as to which functions exist for it. Most user applications will find SetPercent or DoDelta to be useful rather than setting a fixed number, but there's nothing wrong with setting it directly.