Ask a simple question, get a simple answer
Re: Ask a simple question, get a simple answer
Does this solution work for saving and reloading? Or is the new colour setting lost because of the minimalSaveState of the trees (in this example)?
Re: Ask a simple question, get a simple answer
I will apply all possible ways and export my mod and let you know.
Re: Ask a simple question, get a simple answer
In all possible variations, the colors are indeed lost
Minimal savestate has to be disabled for the trees in the custom asset script file for the autumn and winter trees
And a define object has to be added for the original forest oak tree cluster
And I will probably just do that. The change in variation and overall looks is subtle but very nice to look at
EDIT: So I managed to put the autumn/winter trees on minimal savestate false.
I just need some help defining a new object for the default forest oak cluster so I can color them in as well.
Would this be the right way?
Edit2: deleting the material line did the trick
Minimal savestate has to be disabled for the trees in the custom asset script file for the autumn and winter trees
And a define object has to be added for the original forest oak tree cluster
And I will probably just do that. The change in variation and overall looks is subtle but very nice to look at
EDIT: So I managed to put the autumn/winter trees on minimal savestate false.
I just need some help defining a new object for the default forest oak cluster so I can color them in as well.
Would this be the right way?
Code: Select all
defineObject{
name = "forest_oak_cluster_color",
baseObject = "base_obstacle",
components = {
{
class = "Model",
model = "assets/models/env/forest_oak_cluster.fbx",
material = "forest_oak_cluster",
dissolveStart = 2,
dissolveEnd = 5,
shadowLod = 1,
staticShadow = true,
--debugDraw = true,
-- bounding box fix: automatically computed bounding box is too small because the model is built incorrectly
-- (without skinning all the trees in the cluster are in one place)
boundBox = { pos = vec(0, 5, 0), size = vec(8, 10, 8) },
},
{
class = "Animation",
animations = {
sway = "assets/animations/env/forest_oak_cluster_idle.fbx",
},
playOnInit = "sway",
loop = true,
maxUpdateDistance = 5,
},
},
editorIcon = 168,
automapTile = "trees",
minimalSaveState = false,
}
Re: Ask a simple question, get a simple answer
Alternatively...
Define this object, and place it on the map somewhere:
For the example, add five forest_oak_clusters to the map.
Create a script_entity, and set the id to: touch_ups, and put your changes in the touchUps function.
Define this object, and place it on the map somewhere:
Code: Select all
defineObject{
name = "touch_up_trigger",
baseObject = "base_floor_decoration",
minimalSaveState = true,
components = {
{
class = "Null",
onInit = function(self)
if touch_ups and touch_ups.script and touch_ups.script.touchUps
then touch_ups.script:touchUps() end end,
}
}
}
Create a script_entity, and set the id to: touch_ups, and put your changes in the touchUps function.
Code: Select all
-- set id to touch_ups
function touchUps()
--volatile changes
forest_oak_cluster_1.model:setEmissiveColor(vec(-.025))
forest_oak_cluster_2.model:setEmissiveColor(vec(-.01,-.005,-.05))
forest_oak_cluster_3.model:setEmissiveColor(vec(0,0,-.01))
forest_oak_cluster_4.model:setEmissiveColor(vec(-.025,-.01))
forest_oak_cluster_5.model:setEmissiveColor(vec(-.01,-.025,-.06))
end
Re: Ask a simple question, get a simple answer
That's even more helpful
All good stuff I can use to have a cleaner and more diversed look.
Next question,
A script to use Component:setOffset() and Component:setRotationAngles() based on Time.currentTime() so that my boats in my mod "animate" in sync with the water shader's waves.
it's an idea Minmay pitched a couple of years ago. And i'm quite interested in
All good stuff I can use to have a cleaner and more diversed look.
Next question,
A script to use Component:setOffset() and Component:setRotationAngles() based on Time.currentTime() so that my boats in my mod "animate" in sync with the water shader's waves.
it's an idea Minmay pitched a couple of years ago. And i'm quite interested in
Re: Ask a simple question, get a simple answer
Hey, guys! Been a while but I finally sat down to wrap up this mod I was making.
I dropped in four golden treasures from a G1 asset pack to have as a little extra treasure hunt.
However, I'm not sure how to keep track of how many of the items the player has collected across different maps. What would be the most sensible way to do this?
When trying to do this, I realized I really don't know how to track anything across levels...
I dropped in four golden treasures from a G1 asset pack to have as a little extra treasure hunt.
However, I'm not sure how to keep track of how many of the items the player has collected across different maps. What would be the most sensible way to do this?
When trying to do this, I realized I really don't know how to track anything across levels...
Re: Ask a simple question, get a simple answer
Easiest way: surface component to a counter.
As soon the treasure is picked up from a surface, the counter increases.
Make sure to .surface:disable() after the treasure has been picked up. You now have a tracker.
If you want to do it properly, Check out Minmay's DM example dungeon Artifacts of Might.
As soon the treasure is picked up from a surface, the counter increases.
Make sure to .surface:disable() after the treasure has been picked up. You now have a tracker.
If you want to do it properly, Check out Minmay's DM example dungeon Artifacts of Might.
Re: Ask a simple question, get a simple answer
For some reason I had assumed counters don't work if you unload one level and load another, which is stupid because that's exactly how teleports work...
Thank you!
Thank you!
- Zo Kath Ra
- Posts: 937
- Joined: Sat Apr 21, 2012 9:57 am
- Location: Germany
Re: Ask a simple question, get a simple answer
How does BrainComponent:dropItemOn(string, string) work?
Re: Ask a simple question, get a simple answer
That reminds me. I haven't dabbled into scripted monster movement yet
Are there example dungeon editor files i can use?
Are there example dungeon editor files i can use?