Jump to content

Recommended Posts

Posted

I currently have two structures that generate. When I started to add loot to the second, holy_altar, it began to crash on world generation.

This is the console output that I am getting: 

  Reveal hidden contents

 

I am pretty sure that lag is being caused between ticks and causing the game to crash.

What would be a better way to write this code?

 

Code: https://github.com/Merthew/Empire-Of-Blood

Current Files: WorldGenStructure, WorldGenCustomStructure

The seven became one and the one became two.

Posted
  Quote

structureName == "holy_shrine"

Expand  

Don't compare strings like that. Use equals.

 

I am unable to replicate the crash in test environment. And the code provided on github shouldn't crash. I see that you've changed it recently. Is the issue still relevant?

 

As a side note - don't set the loot in the chest manually, use loottables.

Posted

Could not get loot tables to work and managed to fix the issue. Also will fix the string thing, now i just need to get the randomness of the generation to work right.

The seven became one and the one became two.

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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