Editing Modding Tutorials/Smelter
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 180: | Line 180: | ||
Launch the game and see what happens. Everything looks good, right? We added a bill and we can configure it in the bills menu. Wait... there's no slag on the screen. Activate God Mode and then choose "Tool: Spawn thing" from the menu (it's near the bottom of the second column). Then click "Slag debris" from the next menu (it's about the middle of the second column). Click around on screen and drop some slag. Right click when you've finished. Now that there's some slag lying about and a bill to melt it down at the smelter, colonists should start getting to work! Except... they aren't. They're just standing about. Selecting a colonist and right clicking on the smelter also doesn't do anything. That's because our colonists aren't aware that actually completing the bill at the smelter is, well, their job. And that is the third step in making our smelter. | Launch the game and see what happens. Everything looks good, right? We added a bill and we can configure it in the bills menu. Wait... there's no slag on the screen. Activate God Mode and then choose "Tool: Spawn thing" from the menu (it's near the bottom of the second column). Then click "Slag debris" from the next menu (it's about the middle of the second column). Click around on screen and drop some slag. Right click when you've finished. Now that there's some slag lying about and a bill to melt it down at the smelter, colonists should start getting to work! Except... they aren't. They're just standing about. Selecting a colonist and right clicking on the smelter also doesn't do anything. That's because our colonists aren't aware that actually completing the bill at the smelter is, well, their job. And that is the third step in making our smelter. | ||
− | == Create a | + | == Create a WorkGiverDef == |
To make the colonists aware of what work needs to be done, we need to write a WorkGiverDef. This will tell the game to tell them that, hey, you should do this task. Otherwise they'll ignore it. Who's to tell them that smelting slag is their job and not, say, that of the Muffalo? Eating plants is a job but no one told them to do that either. | To make the colonists aware of what work needs to be done, we need to write a WorkGiverDef. This will tell the game to tell them that, hey, you should do this task. Otherwise they'll ignore it. Who's to tell them that smelting slag is their job and not, say, that of the Muffalo? Eating plants is a job but no one told them to do that either. |