Jump to content

Guppycur's Modlets


Guppycur

Guppy Poll  

224 members have voted

  1. 1. Do you use my mods?



Recommended Posts

I think its kinda cool that you have to actually find them instead of crafting them. Although I might keep it in until I see how easy they actually are to find, and if they are vital to the ares they are in..

And I am trying to figure out how to change amount of base xp per lvl via xpath, since it has no name and value, just a named value kinda.. So gonna focus on that first of all I think. Only a few days since I started learning xpath and xml, so half the time I have no idea what I'm doing :D

Link to comment
Share on other sites

Yeh I messed with it some, and ended up not caring; I figure what does a high quality light do better? Thanks for the catch though.

 

At any rate, swapping things around a bit today; if I can get what I want done, I'll push another version.

 

Real life stuff pending.

Link to comment
Share on other sites

Yeh I messed with it some, and ended up not caring; I figure what does a high quality light do better? Thanks for the catch though.

 

At any rate, swapping things around a bit today; if I can get what I want done, I'll push another version.

 

Real life stuff pending.

 

Real life? What is this "real life" you speak of?

Link to comment
Share on other sites

Guppycur sir, I noticed when picking up the POI lanterns, you recieve the block instead of the item. So you can't use it as a flashlight until you place it and pick it up again. A little confusing. What about instead of the block being pickup on destroy that you add the "pick up" and "on pick up" properties to the POI ones? Or was this intentional?

 

edit: sorry didn't think about how the lights work. I think it already has a pick up on it.

Edited by Khelldon (see edit history)
Link to comment
Share on other sites

I was trying to make these work too!

 

Hey Guppycur! I too was trying to make these light sources workable too, so I'll link my post to the mod forum!

 

https://7daystodie.com/forums/showthread.php?102243-REQUEST-Lanterns-Flashlights-and-Lamps-Providing-more-varied-light-sources!

 

I'm new to modding so I tried working out these lights myself and came up with this.

 

<configs>
<append xpath="/recipes">
	<recipe name="lanternRed" count="1" craft_area="workbench" tags="learnable">
		<ingredient name="resourceForgedIron" count="2"/>
		<ingredient name="resourceScrapPolymers" count="2"/>
		<ingredient name="resourceElectricParts" count="4"/>
		<ingredient name="resourceHeadlight" count="1"/>
	</recipe>

	<recipe name="flashlightYellow" count="1" craft_area="workbench" tags="learnable">
		<ingredient name="resourceForgedIron" count="2"/>
		<ingredient name="resourceScrapPolymers" count="2"/>
		<ingredient name="resourceElectricParts" count="4"/>
		<ingredient name="resourceHeadlight" count="1">
	</recipe>

	<recipe name="lampTable" count="1" craft_area="workbench" tags="learnable">
		<ingredient name="resourceForgedIron" count="2"/>
		<ingredient name="resourceScrapPolymers" count="2"/>
		<ingredient name="resourceElectricParts" count="5"/>
		<ingredient name="resourceHeadlight" count="1"/>
	</recipe>

	<recipe name="lampDesk" count="1" craft_area="workbench" tags="learnable">
		<ingredient name="resourceForgedIron" count="2"/>
		<ingredient name="resourceScrapPolymers" count="2"/>
		<ingredient name="resourceElectricParts" count="5"/>
		<ingredient name="resourceHeadlight" count="1"/>
	</recipe>

	<recipe name="lightWork" count="1" craft_area="workbench" tags="learnable">
		<ingredient name="resourceForgedIron" count="5"/>
		<ingredient name="resourceDuctTape" count="2"/>
		<ingredient name="resourceElectricParts" count="8"/>
		<ingredient name="resourceHeadlight" count="1"/>
	</recipe>

</append>
</configs>

 

I based these recipes on existing vanilla ones and added plastic polymers required to make the modern red lantern and yellow flashlight. You'll also see that I tried to make the green desk lamp and round table lamp workable too.

 

I had no idea how to actually implement them into the game. I tried several ways but none of them work!

 

I also found the entity references in the vanilla folder.

 

<block name="lanternDecorLight">
<property name="Extends" value="porchLight01"/>
<property name="Model" value="Entities/Lighting/lanternDecorPrefab"/>
</block>

<block name="flashlightDecor">
<property name="Extends" value="porchLight01"/>
<property name="Model" value="Entities/Lighting/flashlightDecorPrefab"/> <property name="HandleFace" value="Bottom"/>
</block>

<block name="workLightPOI">
<property name="Extends" value="porchLight01" param1="HandleFace"/>
<property name="Model" value="Entities/Lighting/work_lightPrefab"/>
<property name="DisplayType" value="blockMulti" />
<property name="MultiBlockDim" value="1,2,1"/>
<property name="Collide" value="melee,bullet,arrow,rocket,movement"/>
</block>

 

I found this coding that relates to the 3 items in the blocks.xml in the vanilla folder. They reference entity models I couldn't access look so no luck there. I also tried coding them in by referencing the "porchlight01" entity, but that led to nowhere.

 

If I'm correct, you were trying to make these POI lights work by replacing them with your models when you break the vanilla objects. That's a cool way to approach it. I really like the look of the red lantern and I've been trying to get it working for quite some time. You could make the oil lantern as a separate craftable and have the modern red lanterns working too.

 

Quasimiyao, you had a working set of code that made the vanilla ones craftable, is it possible I could try out that code as well? That would be lovely to have a look at it.

 

Apologies for any miscommunications! I'm sorta new to forums! :smile-new:

Link to comment
Share on other sites

No worries, but I am a little confused about what you're asking for; you want the red lights and green lamps to drop and be placeable as well?

 

That will be an easy add-on, and I'll include it in the next update.

 

There is an inherent problem mixing a block with the class "light" and using "canpickup", so for now the blocks have to be destroyed to drop.

 

I hope that answers your questions.

Link to comment
Share on other sites

Quasimiyao, you had a working set of code that made the vanilla ones craftable, is it possible I could try out that code as well? That would be lovely to have a look at it.

 

I just added a recipe for the constructionlight in the mod, havent tried that on any other POI lights in the game. And I used the recipe for the spotlight as a base, so same ingredients..

 

But the recipe code looks like this (I added in the xpath append here, I dont use that in his mod as its already a recipe.xml there for the other ones)

 

<configs>
<append xpath="/recipes">

       <recipe name="ConstructionLight" count="1" craft_area="workbench">
	       <ingredient name="resourceHeadlight" count="1"/>
       <ingredient name="resourceElectricParts" count="8"/>
       <ingredient name="resourceDuctTape" count="2"/>
       <ingredient name="resourceScrapIron" count="50"/>
</recipe>

      </append>
</configs>

Link to comment
Share on other sites

No worries, but I am a little confused about what you're asking for; you want the red lights and green lamps to drop and be placeable as well?

 

That will be an easy add-on, and I'll include it in the next update.

 

There is an inherent problem mixing a block with the class "light" and using "canpickup", so for now the blocks have to be destroyed to drop.

 

I hope that answers your questions.

 

I'm sorry that my answer was confusing!

 

When you break the red lanterns you receive the oil lantern you make. I was wondering if it was possible that you get the red lantern instead. That way you would have both the red lantern and oil lantern in game. I always think that the more building options you have the better.

 

But it's your mod do as you want. :)

 

Also Quasimiyao I read in the previous posts that you made recipes for the other POI lights as well but I'm not sure where to find them. Could you please provide a link? I should be easy as dropping them into the recipes.xml? Or do you need to make a modlet?

Edited by Seda (see edit history)
Link to comment
Share on other sites

Testing Lights

 

So I tried some coding and came up with this for the recipes.

 

<configs>
<append xpath="/recipes">

	<recipe name="lanternDecorLightPlayer" count="1" craft_area="workbench">
		<ingredient name="resourceForgedIron" count="2"/>
		<ingredient name="resourceScrapPolymers" count="5"/>
		<ingredient name="resourceElectricParts" count="4"/>
		<ingredient name="resourceHeadlight" count="1"/>
	</recipe>

	<recipe name="flashlightDecorPlayer" count="1" craft_area="workbench">
		<ingredient name="resourceForgedIron" count="2"/>
		<ingredient name="resourceScrapPolymers" count="5"/>
		<ingredient name="resourceElectricParts" count="4"/>
		<ingredient name="resourceHeadlight" count="1">
	</recipe>

	<recipe name="worklightDecorPlayer" count="1" craft_area="workbench">
		<ingredient name="resourceForgedIron" count="5"/>
		<ingredient name="resourceDuctTape" count="2"/>
		<ingredient name="resourceElectricParts" count="8"/>
		<ingredient name="resourceHeadlight" count="1"/>
	</recipe>

	<recipe name="lampdeskDecorPlayer" count="1" craft_area="workbench">
		<ingredient name="resourceForgedIron" count="2"/>
		<ingredient name="resourceScrapPolymers" count="5"/>
		<ingredient name="resourceElectricParts" count="5"/>
		<ingredient name="resourceHeadlight" count="1"/>
	</recipe>

	<recipe name="lamptableDecorPlayer" count="1" craft_area="workbench">
		<ingredient name="resourceForgedIron" count="2"/>
		<ingredient name="resourceScrapPolymers" count="5"/>
		<ingredient name="resourceElectricParts" count="5"/>
		<ingredient name="resourceHeadlight" count="1"/>
	</recipe>


</append>

</configs>

 

I then tried creating the blocks.xml as follows.

 

<configs>

<append xpath="/blocks">

	<!-- Block Begin Here -->

	<block name="lanternDecorLightPlayer">
		<property name="Extends" value="lanternDecorLight"/>
		<property name="Class" value="PlayerLight,mods"/>
		<property name="CustomIcon" value="lanternDecorLight"/>
		<property name="CreativeMode" value="Player"/>
		<property name="TakeDelay" value="2"/>
		<property name="RuntimeSwitch" value="true"/>
		<property name="Model" value="Entities/Lighting/lanternDecorPrefab"/>
	</block>

	<block name="flashlightDecorPlayer">
		<property name="Extends" value="flashlightDecor"/>
		<property name="Class" value="PlayerLight,mods"/>
		<property name="CustomIcon" value="flashlightDecor"/>
		<property name="CreativeMode" value="Player"/>
		<property name="TakeDelay" value="1"/>
		<property name="RuntimeSwitch" value="true"/>
		<property name="Model" value="Entities/Lighting/flashlightDecorPrefab"/> <property name="HandleFace" value="Bottom"/>
	</block>

	<block name="worklightDecorLightPlayer">
		<property name="Extends" value="workLightPOI"/>
		<property name="Class" value="PlayerLight,mods"/>
		<property name="CustomIcon" value="workLightPOI"/>
		<property name="CreativeMode" value="Player"/>
		<property name="TakeDelay" value="2"/>
		<property name="RuntimeSwitch" value="true"/>
		<property name="Model" value="Entities/Lighting/work_lightPrefab"/>
	</block>

	<block name="lampdeskDecorPlayer">
		<property name="Extends" value="deskLampLight"/>
		<property name="Class" value="PlayerLight,mods"/>
		<property name="CustomIcon" value="deskLampLight">
		<property name="CreativeMode" value="Player"/>
		<property name="TakeDelay" value="2"/>
		<property name="RuntimeSwitch" value="true"/>
		<property name="Model" value="Entities/Lighting/desk_lampPrefab"/>
	</block>

	<block name="lamptableDecorPlayer">
		<property name="Extends" value="tableLampLight"/>
		<property name="Class" value="PlayerLight,mods"/>
		<property name="CustomIcon" value="deskLampLight">
		<property name="CreativeMode" value="Player"/>
		<property name="TakeDelay" value="2"/>
		<property name="RuntimeSwitch" value="true"/>
		<property name="Model" value="Entities/Lighting/table_lampPrefab"/>
	</block>



	<!-- Block End Here -->

</append>

</configs>

 

I place both together into a folder with a basic modinfo.xml and place them into the mods folder. Of course it doesn't work.

 

I examined the coding for Guppy's Light System and PETE's Portable lights but I've had no success.

 

All I'm trying to do is make the lights able to be crafted, placed, turned on, and hopefully be able to be picked up at least in a claim block zone.

Link to comment
Share on other sites

So I tried some coding and came up with this for the recipes.

All I'm trying to do is make the lights able to be crafted, placed, turned on, and hopefully be able to be picked up at least in a claim block zone.

 

If I remember correctly, Guppy or someone mentioned that they are decorations only at the moment so nothing can really be done with them at the moment. I don't know why decorations are limited but I think it may have even be earlier in this thread that it was mentioned.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...