Register
Email: Password:
Forum » Notrium modding questions/answers
  • « previous
  • 1
  • 27
  • 28
  • 29
  • 30
  • 31
  • » next
  • Notrium modding questions/answers

    INFERNUS 13 years ago
    I have some erors and i dont know how to fix them, so i cant work on my new mod.
    If anybody know how to fix them i will upload the mod and PM you.
    #
    Areetsa 13 years ago
    Is it possible to create an item which can be broken into its component parts, but not reformed?

    I ask, because part of a minor mod I'm fiddling with involves, nay, requires that you be able to break pistol rounds apart for the explosive and bullet contained inside, but I'd really prefer not to have an empty cartridge case and primer lying about in the player's inventory; particularly since A: they're dangerously easy to set off, and B: the ultimate result of this item breaking requires about 30 pistol rounds to have been taken apart first, and that's a lot of useless single use items to have in your pockets.

    So; I want to have it so breaking the "Bullets" item produces two other items; an explosive powder, and a bullet, but that you not be able to put those two items together to make a "Bullets". Possible?/Possible but complicated and involving such eldritch things as scripts, invisible item eating creatures and plotobjects?/Impossible?
    #
    Narvius 13 years ago
    You make the bullet usable. Using it removes it from the inventory and adds the components (using a script). Basically, just ignore the normal break-up system. Examples are all over the place (the robot wreckage). It's pretty simple, really.
    #
    Areetsa 13 years ago
    "Narvius" said:
    You make the bullet usable. Using it removes it from the inventory and adds the components (using a script). Basically, just ignore the normal break-up system. Examples are all over the place (the robot wreckage). It's pretty simple, really.
    Wanted to keep the explosive tendencies it has, but looks like that'd work.
    Just have to add something to the effect of "it looks unstable, but should be simple enough to take apart with a bit of care".
    Ta.
    #
    Narvius 13 years ago
    It's also possible to add multiple use-keys with different effects. I'm not exactly sure how that's done, but, for examples, look into the Werivar crafting chips, or the Werivar Extension Scavenger Devour.
    #
    Areetsa 13 years ago
    "Narvius" said:
    It's also possible to add multiple use-keys with different effects. I'm not exactly sure how that's done, but, for examples, look into the Werivar crafting chips, or the Werivar Extension Scavenger Devour.
    Yeah, I know; the center of this small mod of mine is a highly adaptable rifle, which the player starts with; trouble is, there's only enough ammunition on hand to bring every alien in earshot running and after that it has to be scavenged for.

    Part of that is an ammunition crafting system, which boils down to the explosive powder from the pistol bullets having several uses, including being combined with small lengths of metal rod to produce bulletless casings for the aforemntioned rifle in 15 unit batches, and being combined with metal rod chunks to produce bulletless casings for the modified Sniper Pistol in 5 unit batches, because for one it never made sense to me that slippery bullets + longer barrel can turn a popgun into a map-spanning all destroying weapon of doom, and for two, spending fifteen minutes mixing up slippery bullets is no fun at all.

    Thanks for the help, anyway; plain "use" didn't occur to me.
    Bit of a headslapper, come to think of it.


    'Nother quick question: combine times of 0. Game crashing, or instant combinations?
    #
    Venom31 13 years ago
    Almost instant. You can notice some motion in between inventory pop-up, so it's not absolutely zero. Don't know if it will cause any non-hard bugs however.
    #
    Areetsa 13 years ago
    "Venom31" said:
    Almost instant. You can notice some motion in between inventory pop-up, so it's not absolutely zero. Don't know if it will cause any non-hard bugs however.
    Think it was used in the Werivar Expansion, come to think of it. Didn't really notice any bugs, but I probably wouldn't spot them even if there were any.
    #
    Areetsa 13 years ago
    How long is a Vanilla Notrium day/night cycle? That is, how many seconds seperate twilight from dawn? I want to make a "smart" lighting system, which will turn itself off to save power during the day. I've already got the automatic energy drain for the "dumb" one, which just makes light all day long, and I figure I'll use a different, self-draining and resetting bar as a sort of timekeeping measure for the smart one. Trouble is, I need to know how long a night lasts.
    #
    Venom31 13 years ago
    Even if you get that, what if it occasionally becomes out of phase. It will also need to store phase of lighting in saves.
    #
    Areetsa 13 years ago
    "Venom31" said:
    Even if you get that, what if it occasionally becomes out of phase. It will also need to store phase of lighting in saves.
    I plan to use a bar that drains itself at an even rate, except for half the day.
    Should be pretty foolproof; I don't think saving/loading will cause problems, since I'm working off bars rather than scripts.

    Worst case, I can just go with the "dumb" version and have the lights burning all day long (except when you need them most).

    EDIT: yeah, Imma go with "mentally differently abled". I'm innately lazy.
    #
    MaR69 13 years ago
    So, I started making a mod and I got a couple of questions:
    -How to create melee weapons (axe,baseball bat etc.)
    -How to create a vehicle (car, motorbike etc.) and a health bar for them (like when they hit walls they lose 10 hp)
    -How to make a fire that harms you and how to make a fire extingushier that "kills" them
    -How to make a friendly side (Example: peaceful,neutral,enemy...)
    #
    INFERNUS 13 years ago
    "MaR69" said:
    So, I started making a mod and I got a couple of questions:
    -How to create melee weapons (axe,baseball bat etc.)
    -How to create a vehicle (car, motorbike etc.) and a health bar for them (like when they hit walls they lose 10 hp)
    -How to make a fire that harms you and how to make a fire extingushier that "kills" them
    -How to make a friendly side (Example: peaceful,neutral,enemy...)

    In weapons.dat
    Melee weapon
    Axe;//name---------------------------------------
    1;//identifier
    0;//class
    bullet0.png;//bullet texture
    1;//bullets at one shot
    0;//stop at hit 0=stop where hit, 1=don't stop
    0.000000;//bullet size
    0.060000;//spread
    1.000000;//bullet speed
    50.000000;//time until bullet disappears-----------> put this to 50.000000 so it has small range
    600;//fire rate
    0;//trace 0=no trace, 1=blue beam, 2=bullet trace, 3=red beam, 4=green beam, 5=yellow beam
    -1;//hit visual effect colour, -1=nothing 0=?, 1=red, 2=green, 3=blue
    -1;//hit visual effect particle, -1=nothing, 0=>particle from particles.dat
    none;//hit effect sound
    0.000000;//push target back
    0.000000;//push shooter back
    claws0.wav;//fire sound
    claws0_hit.wav;//hit sound
    1.000000;//AI hear volume, the amount of anger the AI gets when it hears the weapon
    begin_wield_conditions;
    end_wield_conditions;
    begin_fire_effects;
    end_fire_effects;
    begin_hit_effects;
    4;//effect number
    -10.000000;//parameter1
    0.000000;//parameter2
    0.000000;//parameter3
    0.000000;//parameter4
    end_hit_effects;



    In sides.dat


    Player side;//name-------------------------
    0;//identifier
    start_hostile_sides----->Put ID of sides so your/enemy creatures must attack them
    1;
    7;
    6;
    end_hostile_sides

    In creatures.dat
    Fire;//name---------------------------------------
    1;//identifier
    0;//class
    none.png;//texture
    1;//draw layer
    -1;//corpse item number in items.dat, -1=nothing, -2=whole corpse vanishes when dead
    0;//corpse item amount
    0;//attack type, 0=shooting attack, 1=close combat
    -1;//particle to show on radar, -1=none
    1;//primary AI tactic from AI_tactic.dat
    1;//secondary AI tactic from AI_tactic.dat
    0;//footstep particle from particles.dat
    0;//die after how many seconds, 0=doesn't die
    -1;//eat item number from items.dat, -1=nothing
    0.400000;//creature size
    999.000000;//creature weight (affects pushing)
    0.000000;//maximum movement speed
    0.000000;//minimum movement speed
    0.000000;//leg animation speed
    0.000000;//turn speed
    0.000000;//inertia level (acceleration/deceleration)
    0;//hide when behind walls
    0;//weapon number
    0.000000;//weapon_x
    0.000000;//weapon_y
    0;//blood particle
    0;//bars visible when player hovers mouse on top
    1.000000;//death animation speed
    0;//creature can move from area to another
    1000.000000;//AI hear range
    500.000000;//AI see range
    4.000000;//AI see angle
    begin_footstep_sounds
    end_footstep_sounds
    begin_hit_sounds
    groan0.wav;//sample name
    groan1.wav;//sample name
    groan2.wav;//sample name
    end_hit_sounds
    begin_die_sounds
    groan0.wav;//sample name
    groan1.wav;//sample name
    groan2.wav;//sample name
    end_die_sounds
    begin_eat_block
    end_eat_block
    begin_death_block
    end_death_block
    begin_hit_block
    end_hit_block
    begin_timed_block
    500;//interval in milliseconds
    begin_conditions;
    14;//condition------>if player is near
    -1.000000;//condition parameter0
    100.000000;//condition parameter1
    end_conditions;
    begin_effects;
    4;//effect number----->give heat to player
    0.350000;//parameter1
    -1.000000;//parameter2
    2.000000;//parameter3
    -1.000000;//parameter4
    end_effects;
    1000;//interval in milliseconds
    begin_conditions;
    14;//condition-----> if player is near
    -1.000000;//condition parameter0
    10.500000;//condition parameter1
    end_conditions;
    begin_effects;
    23;//effect number----->hurt player
    -2.000000;//parameter1
    10.000000;//parameter2
    0.000000;//parameter3
    6000.000000;//parameter4
    4;//effect number----->give heat to player
    2.000000;//parameter1
    -1.000000;//parameter2
    2.000000;//parameter3
    -1.000000;//parameter4
    end_effects;
    end_timed_block
    begin_specialties
    HP for fire;//description
    0;//number
    1.000000;//parameter0
    0.000000;//parameter1
    20.000000;//parameter2
    20.000000;//parameter3
    end_specialties


    And fire extingushier.
    In weapons.dat


    Fire extingushier;//name---------------------------------------
    1;//identifier
    1;//class
    none.png;//bullet texture
    3;//bullets at one shot
    0;//stop at hit 0=stop where hit, 1=don't stop
    0.000000;//bullet size
    0.160000;//spread
    0.700000;//bullet speed
    150.000000;//time until bullet disappears
    50;//fire rate
    0;//trace 0=no trace, 1=blue beam, 2=bullet trace, 3=red beam, 4=green beam, 5=yellow beam
    -1;//hit visual effect colour, -1=nothing 0=?, 1=red, 2=green, 3=blue
    -1;//hit visual effect particle, -1=nothing, 0=>particle from particles.dat
    fire.wav;//hit effect sound
    0.000000;//push target back
    0.000000;//push shooter back
    fire.wav;//fire sound
    none;//hit sound
    1.000000;//AI hear volume, the amount of anger the AI gets when it hears the weapon
    begin_wield_conditions;
    end_wield_conditions;
    begin_fire_effects;
    26;//effect number
    1.000000;//parameter1-----> create white particle in particle.dat and put particle ID here
    2.000000;//parameter2
    1.000000;//parameter3----->Put fire extinguisher ID here
    0.000000;//parameter4
    end_fire_effects;
    begin_hit_effects;
    4;//effect number
    -1.000000;//parameter1
    0.000000;//parameter2
    1.000000;//parameter3
    0.000000;//parameter4
    end_hit_effects;

    And for car i dont know the scripts.
    Im not sure that everything will work.
    If something dosnt work i will try to fix it.
    #
    MaR69 13 years ago
    Another question! I made a melee weapon (axe) and I was wondering how to make it look that my player is wielding the axe?
    #
    INFERNUS 13 years ago
    "MaR69" said:
    Another question! I made a melee weapon (axe) and I was wondering how to make it look that my player is wielding the axe?




    Plz tell me - are you making a new mod (barebones mod) or you are editing in Defalut mod?
    It will make me easier to help you.
    #
    MaR69 13 years ago
    I'm starting from barebones. I'm halfway there. The name's a secret
    Now please help me with that
    #
    Pete 13 years ago
    I cast summon hazy memories!

    Okay, lets see - youll need to edit the sprite sheet to have an actual animation for axe-like weapons, then create an axe-like weapon type and make your axe part of it, then assing the row number of the axe swing animation to it? I think? Maybe?

    ...on second thought, wait for someone with less hazy memories to answer.
    #
    INFERNUS 13 years ago
    "MaR69" said:
    I'm starting from barebones. I'm halfway there. The name's a secret
    Now please help me with that


    I cast summon hazy memories!

    Okay, lets see - youll need to edit the sprite sheet to have an actual animation for axe-like weapons, then create an axe-like weapon type and make your axe part of it, then assing the row number of the axe swing animation to it? I think? Maybe?

    ...on second thought, wait for someone with less hazy memories to answer.
    Do what Pete says.

    In player race.dat

    1;//weapon class number------>put it to 1

    1;//can use the weapon class (0=cannot, 1=can)
    player1.png;texture name----->must make your own png. image
    2;//row that contains the 4 weapon frames----->

    1.000000;//weapon_x
    30.000000;//weapon_y

    wep.dat

    Axe;//name---------------------------------------
    1;//identifier
    0;//class------>if {1;//weapon class number} is 1 the put here 1
    bullet0.png;//bullet texture
    1;//bullets at one shot
    0;//stop at hit 0=stop where hit, 1=don't stop
    0.000000;//bullet size
    0.060000;//spread
    1.000000;//bullet speed
    50.000000;//time until bullet disappears
    600;//fire rate
    0;//trace 0=no trace, 1=blue beam, 2=bullet trace, 3=red beam, 4=green beam, 5=yellow beam
    -1;//hit visual effect colour, -1=nothing 0=?, 1=red, 2=green, 3=blue
    -1;//hit visual effect particle, -1=nothing, 0=>particle from particles.dat
    none;//hit effect sound
    0.000000;//push target back
    0.000000;//push shooter back
    claws0.wav;//fire sound
    claws0_hit.wav;//hit sound
    1.000000;//AI hear volume, the amount of anger the AI gets when it hears the weapon
    begin_wield_conditions;
    end_wield_conditions;
    begin_fire_effects;
    end_fire_effects;
    begin_hit_effects;
    4;//effect number
    -10.000000;//parameter1
    0.000000;//parameter2
    0.000000;//parameter3
    0.000000;//parameter4
    end_hit_effects;
    #
    MaR69 13 years ago
    I made a lot of stuff by now, but if anyone can contribute some textures:
    -machinegun
    -broken car
    -sniper rifle
    -stove
    -stuff that you can find in parks(slides,sways,trees,flowers etcetera)
    -baseball bat
    Infernus, thank you very much, if I ever finish my mod I will mention you in the credits.
    P.S. every contributor will be mentioned too
    #
    INFERNUS 13 years ago
    xD
    I will edit them
    il be finish about 1 hour
    #
    INFERNUS 13 years ago
    <!-- m --><a class="postlink" href="http://hotfile.com/dl/120814681/04bb528/images.zip.html">http://hotfile.com/dl/120814681/04bb528/images.zip.html</a><!-- m -->
    #
    MaR69 13 years ago
    Infernus, you rock
    These textures are great, I just have to make them smaller a bit and they'll be perfect
    I still need:
    -park stuff(sways,slides,trees,bushes,sprinklers,flowers,benches)
    -home stuff(refrigerators,stoves,bathtubs,toilets etc.)
    -broken car
    I am making some graphics too, but I really don't have a lot of time so anyone can contribute.
    Infernus, jesi ti iz Hrvatske?
    #
    INFERNUS 13 years ago
    Jesi ti iz Hrvatske?
    Naravno xD
    #
    INFERNUS 13 years ago
    <!-- m --><a class="postlink" href="http://hotfile.com/dl/120897052/7edb204/images.zip.html">http://hotfile.com/dl/120897052/7edb204/images.zip.html</a><!-- m -->
    you can find trees/bushes in other mods xD
    #
    MaR69 13 years ago
    Infernus, awesome textures again
    #
    INFERNUS 13 years ago
    Anyone know a site with FREE UNCOPYRIGHTED images? (guns, items...)
    #
    Anonymous1157 13 years ago
    I don't know of any websites with free, uncopyrighted images of objects, but if it's any help, I know of one website with free, high-resolution textures that I've used myself.

    I've got an iffy Internet connection right now, so it isn't loading for me, but the website is http://mayang.com/textures.
    #
    INFERNUS 13 years ago
    Unable to connect

    Firefox can't establish a connection to the server at mayang.com.


    It's not working to me either. xD
    I'll try later.
    Tnx
    #
    INFERNUS 13 years ago
    How to make that rocket can fly over barricade ? (not other plot objects or objects definitions only barricade !)
    By the way baricade is plot object not creature .
    And sory for my bad english .
    #
    INFERNUS (guest) 12 years ago
    I have some problems with climate_types.dat
    I started creating my mod from Tutorial (not barebones)
    and when i put - ;//light oscillate time - more than 20 and play it, game starts in nigh and when light are turning brighter it turns to night again. (not sure if you get it)
    How to fix it?
    #
    TNN17 12 years ago
    INFERNUS (guest) said:
    I have some problems with climate_types.dat
    I started creating my mod from Tutorial (not barebones)
    and when i put - ;//light oscillate time - more than 20 and play it, game starts in nigh and when light are turning brighter it turns to night again. (not sure if you get it)
    How to fix it?

    Hm. Not sure. You could do what Notrium Default does and have a no-night area to start with. This should give you a buffer to let daytime kick in.

    I run FM with a 720 oscillation which seems to work fine. What are your Max/Min Light settings?


    Just read back on some of the older questions while I was absent, I'll have a crack at these too.

    Question #2: Barricades: If it's all barriers, you can do this by making the rocket a creature. The Creature can have the speciality to ignore collisions with plot-objects. If you need it to explode on collision with "larger" plot objects, like a mountain, add the timed condition "blow up if within 0px of Plot Object X" for each plot object, with a 1ms timer. Do the same with any creature and skip collision with everything else while you're at it.
    End result: You'll have an exploding rocket that bypasses barricades and then drops an explosion weapon when it crosses any enemy or ends its forward path.

    Question #3: With a decent image editor (I use GIMP myself) any stock photos (or otherwise) can be manipulated into something quite different, have the watermarks removed, and end up with something that is different enough to the original that copyright is not an issue. All my "plants" are actual pictures of plants modified into their current form. Most of them are far, far removed from their original source material.

    Remember that most previous and active mods for Notrium have explicitly made their resources, including images, available for use by any other modder who has the need.

    Depending on your purpose, you may want to look into "fair use". A freeware game using images is unlikely to have the same restrictions as a commercial venture.

    Edited 12 years ago
    #
    INFERNUS 12 years ago
    Hm. Not sure. You could do what Notrium Default does and have a no-night area to start with. This should give you a buffer to let daytime kick in.

    I run FM with a 720 oscillation which seems to work fine. What are your Max/Min Light settings?
    Jungle;//name---------------------------------------------------------------------
    0;//identifier
    1;//can be a random map
    500;//light oscillate time----------------It is working fine if it is set to 20,
    0.000000;//light r phase shift------------but it is switching day and night very fast!
    -0.100000;//light g phase shift
    -0.100000;//light b phase shift
    1.000000;//light r amplitude
    1.000000;//light g amplitude
    1.000000;//light b amplitude
    0.700000;//light max r
    0.500000;//light max g
    0.500000;//light max b
    0.000000;//light min r
    0.000000;//light min g
    0.300000;//light min b
    -0.800000;//night temperature
    0.800000;//day temperature
    0.500000;//maximum wind speed
    -1;//rain particle, -1=no rain
    300;//rain_particle_life_min
    800;//rain_particle_life_max
    15000;//rain_probability (the bigger the number, the more unlikely the rain)
    5000;//rain_time_min
    15000;//rain_time_max
    begin_effects_block;
    Cold rain! Seek cover under a tree.;//event text
    100;//interval
    begin_conditions;
    end_conditions;
    begin_effects;
    23;//effect number
    -1.000000;//parameter1 -6
    -1.000000;//parameter2
    2.000000;//parameter3
    100.000000;//parameter4
    end_effects;
    end_effects_block;
    start_of_terrains;
    2;
    3;
    end_of_terrains;
    start_of_night_sounds;
    wind0.wav;
    wind1.wav;
    wind2.wav;
    groan0.wav;
    groan1.wav;
    groan2.wav;
    end_of_night_sounds;
    start_of_day_sounds;
    jungle0.wav;
    jungle1.wav;
    jungle2.wav;
    jungle3.wav;
    end_of_day_sounds;
    start_of_props;
    end_of_props;
    end_of_props;


    I tried to copy other climate.dat , scripts or tryed to put my scripts in other climates.dat but it is same .

    Question #2: Barricades: If it's all barriers, you can do this by making the rocket a creature. The Creature can have the speciality to ignore collisions with plot-objects. If you need it to explode on collision with "larger" plot objects, like a mountain, add the timed condition "blow up if within 0px of Plot Object X" for each plot object, with a 1ms timer. Do the same with any creature and skip collision with everything else while you're at it.
    End result: You'll have an exploding rocket that bypasses barricades and then drops an explosion weapon when it crosses any enemy or ends its forward path.

    Thanks!





    Edited 12 years ago
    #
    TNN17 12 years ago
    Hunh, weird.

    Is it the same speed if you set it to 20 as it is if you set it to 500? If it is, then check your dat file for a stray line break or something, it might be reading another line in your code than the one you're expecting it to be.

    I note you've got your wavs ending in ";". Was this how it was originally? Checking barebones it's showing no line break on the end of the sounds. I honestly have no idea though, I can't hear the sounds so I don't do much with them in FM.

    Worst case, make a backup and start again from scratch. Use a climate from Default, change nothing but the oscillation time (and probably your terrain), if it works, copy the rest of the info from your backup line by line - checking each time.

    If you want to, send me the file and I'll be happy to check it over in NMV, see if I can't find anything amiss.

    Do you have any scripts that change lighting levels outside of climate?

    Edited 12 years ago
    #
    INFERNUS 12 years ago
    Is it the same speed if you set it to 20 as it is if you set it to 500? If it is, then check your dat file for a stray line break or something, it might be reading another line in your code than the one you're expecting it to be.

    No it is not.
    When i start the game it starts in night, then after 20 sec it is turning brighter (like in morning)and the when it is in the middle of the day(something like 12:00 hours)it turns night instantly!--it skips 1/4 of the notrium day.


    I note you've got your wavs ending in ";". Was this how it was originally? Checking barebones it's showing no line break on the end of the sounds. I honestly have no idea though, I can't hear the sounds so I don't do much with them in FM.

    i removed them and nothing happens.

    Worst case, make a backup and start again from scratch. Use a climate from Default, change nothing but the oscillation time (and probably your terrain), if it works, copy the rest of the info from your backup line by line - checking each time.

    Same as before.

    Do you have any scripts that change lighting levels outside of climate?

    No.

    If you want to, send me the file and I'll be happy to check it over in NMV, see if I can't find anything amiss.

    I will send you an PM later becose i dont have time now to put it on internet.
    #
    TNN17 12 years ago
    Solving daylight problems via scripting (and making seasonal adjustments to daylight). This is theoretical, since I'm not at my modding machine and I'm not currently planning on adding this to FM, so yeah, sorry if it doesn't work? For the same reasons, I'm giving the English for the conditions/effects.

    Note #1: All Climates use a no-oscillation time/no difference in day/night lighting.

    Note #2: You'll need at very least, a player clock, like what exists in Default Notrium or FM. At very least you will need at least hours, in a 24 hour format.

    Ingredients: ~4 Token Items. More tokens, the more smoothly you can transition between day and night. ~One script.

    Step 1: Daylight Control Script:

    Run every 1000ms. Runs by itself.
    No Conditions.
    Use Player's: Daylight Master Token.
    Use Player's: Dusk Token.
    Use Player's: Twilight Token.
    Use Player's: Midnight Token.

    Daylight Master Token: Note that as these are used by scripts, they need neither Use, nor Quick keys.

    Use:
    If: Player has 0 Dusk Tokens.
    If: Player's "Hours" bar is > 18.
    Then: Multiply Light by -0.15 (all colours). NB: You can multiply one of these colours (for example Red for default) to get a sky effect - Red sunset and the like, just make up the difference with future adjustments. I think this is Effect 8.
    Then: Add 1 Dusk Token to Player Inventory.

    Use:
    If: Player has 1 Dusk Token.
    If: Player's "Hours" bar is > 8.
    Then: Multiply Light by 0.15 (all colours).
    Then: Remove 1 Dusk Token from Player Inventory.

    Dusk Token
    Use:
    If: Player has 0 Twilight Tokens.
    If: Player's "Hours" bar is > 20.
    Then: Multiply Light by -0.2 (all colours - note if you had a particular colour tweaked in the Daylight Master Token, you'll need to make up the difference here).
    Then: Add 1 Twilight Token to Player Inventory.

    Use:
    If: Player has 1 Twilight Token.
    If: Player's "Hours" bar is > 5
    Then: Multiply Light by 0.2
    Then: Remove 1 Twilight Token from Player Inventory.

    Twilight Token
    Use:
    If: Player has 0 Midnight Tokens.
    If: Player's "Hours" bar is > 22.
    Then: Multiply Light by -0.2 (all colours - note if you had a particular colour tweaked in the Daylight Master Token, you'll need to make up the difference here).
    Then: Add 1 Midnight Token to Player Inventory.

    Use:
    If: Player has 1 Midnight Token.
    If: Player's "Hours" bar is > 2
    Then: Multiply Light by 0.2
    Then: Remove 1 Midnight Token from Player Inventory.


    This is a barebones system which will:
    If it's 6 p.m.: It will start to get dark.
    At 8 p.m.: It will get much darker.
    At 10 p.m.: It will be the darkest possible.
    This midnight period is a total of -0.55 light level. You can tweak this as you see fit.
    At 2 a.m.: It will start to get brighter.
    At 5 a.m.: It will get even brighter (Dawn).
    At 8 a.m.: Daytime brightness.

    You can also do this in reverse with a Noon token, so you can have increased brightness between 11 a.m. and 1 p.m., just add 0.1 to the light level at this time.

    Now, I honestly forget if this is a "set light level to:" or an "add to existing light level", but if it's the former, just set the light levels accordingly.


    Advanced Stuff:

    You can also use this to calculate seasonal variances by adding conditions to check whether it's, for example, Winter versus Summer.
    You can use this to create a Photosynthesis-type ability. Four separate conditions - If player has: 0 Dusk, 0 Twilight, 0 Midnight, 1 Noon, Then: Add X Energy/Food.
    Or to handle creature behaviours - If player has the appropriate tokens, aliens might become more active, or less. Or move slower.

    Because this is script-based, you can instantly change day-length for every map by modifying the script that advances time.

    To make a more gradual change without extra tokens, you can do it with one more item, a bar, and a script.

    First up, rather than use Effect 8 in the Daylight tokens, instead add that many x100 to your:

    "Light Change bar."
    -20-~20

    Always keep this at integers. Life gets awkward if you forget this simple rule.

    Light Change Script.

    Run every Xms.
    X = however many 20ths there are between each time zone, based on the shortest period and the biggest change.

    In the provided case, 2 "hours", so however long ten minutes takes in your system, that's how long between runs (ten, rather than twelve, since you want to make sure it's finished beforehand to avoid conflicts). So if it's 1000ms per minute, then you'll want it to run every 10000ms.


    Light Change Item:
    Use:
    If: Player's Light Change Bar > 0.
    Then: Multiply Light Level by 0.01. (You'd need to tweak this slightly to pull off a sunset, but it's doable, you just need another item to handle the smaller dawn/dusk change)
    Then: Add -1 to Light Change Bar.

    Use:
    If: Player's Light Change Bar < 0.
    Then: Multiply Light Level by -0.01.
    Then: Add 1 to Light Change Bar.

    This will simply and smoothly adjust your lighting over the course of an hour or so, and back again. Again, the more detail you put in, the more you'll get out.

    So yeah, there you have it, a Day>Night system based on actual data rather than a map-based oscillation pattern. Even if you don't use it, I may use it myself for FM.
    #
    Forum » Notrium modding questions/answers
  • « previous
  • 1
  • 27
  • 28
  • 29
  • 30
  • 31
  • » next
  • Post Reply


    Your email:
    Your name: