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

    INFERNUS 4 years ago
    Definitely going to try this. Thanks
    #
    INFERNUS 4 years ago
    begin_effects_block;
    none;//event text
    none;//event failure text
    use.wav;//sound, none for nothing
    1;//vanishes after event, 0=no, 1=yes
    U;//use key
    -1;//quick key
    begin_conditions;
    end_conditions;
    begin_effects;
    4;//effect number
    15.000000;//parameter1
    0.000000;//parameter2
    0.000000;//parameter3
    0.000000;//parameter4
    end_effects;
    none;//event text
    none;//event failure text
    use.wav;//sound, none for nothing
    1;//vanishes after event, 0=no, 1=yes
    L;//use key
    -1;//quick key
    begin_conditions;
    end_conditions;
    begin_effects;
    16;//effect number
    0.000000;//parameter1
    1.000000;//parameter2
    0.000000;//parameter3
    0.000000;//parameter4
    end_effects;
    end_effects_block;


    If items and plot objects can have multiple effects and conditions, can scripts have them too?






    #
    TNN17 4 years ago
    Simple answer: Yes, you can have as many conditions and effects as you like on Plot Objects, Creature Blocks, Scripts, Items, Weapons (at least as far as wield conditions/hit effects go) and Terrain/Climate effects like rain or swamps.

    Difficult answer: If you want an OR condition (if either of two conditions is true) then no, you need one script per OR condition, or use an item to perform all the different possible condition checks at the same time.
    #
    INFERNUS 4 years ago
    You mean i cant to this with script?
    Example: i want to make this

    Script 1
    If player have bar > 0 -----Condition
    Give item to inventory -----Effect
    If player have bar < 0 -----Condition
    Delete item from inventory -Effect

    not this:

    Script 1
    If player have bar > 0 -----Condition
    Give item to inventory -----Effect

    Script 2
    If player have bar < 0 -----Condition
    Delete item from inventory -Effect
    #
    TNN17 4 years ago
    Ah, I see your question, no, that's what I mean by an OR condition. Items, Rain, Terrain, Plot Objects and Creature Blocks can handle OR conditions with separate effect blocks, but each Script is basically a single effect block in itself.

    You could have Script 1 activate Script 2 and Script 3, doing both checks with one script handling the timing, or have it use an item with several separate Use checks (with Use Player Item, this is the most robust condition check method available and saves on filespace).

    By the way, always remember to include a check to see if the player has the item in their inventory. If you remove items that aren't there, you get a nasty CTD for your trouble.
    #
    INFERNUS 4 years ago
    ahh.. to bad...

    it would be very useful for scripts.

    Tnx.
    #
    YinYin Falcon 4 years ago
    I have recently tried to create a chargeable weapon,
    here are my desired specifications and TNNs instructions:
    YinYin Falcon said:
    a chargeable weapon:
    -first left mouse button fires normally
    -if held a bar increases up towards a maximum (during that time the player animation is changed and/or particles are released at the tip of the weapon)
    -if released below maximum the bar resets and nothing further happens
    -if released at maximum the bar resets and a special projectile is shot
    TNN17 said:
    Two versions of this are possible, one that fires or can be held to interrupt firing and charge up.

    Weapon 1: Charges whilst firing. It also fires particles, which are long lived and fired by Weapon 2 - a short range dummy weapon with a wide spread and short range. This should scatter more and more particles as the weapon charges.

    Wield Script on the Weapon's Item:
    Run every X milliseconds. Doesn't Run By Itself.
    Run three other scripts with conditions (Effect 35 or something, if you need particular numbers I can go get them, I just remember most effects and conditions by what they do rather'n the number).

    #1:
    Condition 37: Player's Left Mouse Button is pressed.
    Increase Player's Charge Bar by Y.
    If you want a disable weapon to charge: Disable this particular weapon for X+1 ms.
    And since you're disabling the weapon, you'll need to add the firing of the SFX weapon to generate the charging particles (you can also add more scripts to fire more particles if the Charge bar is higher).

    #2: Another Condition 37: Player's Left Mouse Button is DE-pressed.
    Charge Bar > Z (Maximum).
    Fire Charged Weapon, normal direction 1 time.
    Set Charge Bar to 0. (It's usually simpler to just -999 with Effect 4 and respect limits for this).
    Again, you can have other scripts after this one with partway charges Megaman style, where 50% charge fires a smaller blast, 100% fires a bigger one.

    #3: 37 again.
    Charge Bar < Z
    Set Charge Bar to 0.

    And add an effect on use to the item just in case that force sets Charge to 0. This should only apply the first time you equip it (rather than being reapplied constantly), so it will ensure you can't charge, switch out to another gun, then switch back and instantly fire.

    The only thing I am having heavy problems with is effect 45 (prevent using charge laser).
    It reacts very randomly:
    The bar charging always works, but
    if I set the prevent time too high the weapon will not fire normally at all,
    if I set it too low it will fire all the time (even during charging).
    Setting the prevent time empirically somewhere in between doesn't help either,
    then it will sometimes fire all the time and sometimes not fire at all.

    Thinking about it I figured it would be better to generally disable the weapon (without timer) and then reenable it again when the left mouse button is not pressed anymore.
    Is there a solution like that?

    Here is what the three scripts look like right now:
    Charge Laser;//name
    64;//identifier
    1;//run without calling (set to 0 if you use the script for example as a wield script)
    0;//call position, 0=player location, 1=mouse location
    0;//calling creature 0=player, 1=creature nearest to the mouse, 2=player controlled creature
    1;//run every n milliseconds
    ;//message
    0;//message type, 0=quick message, 1=journal
    ;//sound, none for nothing
    0;//delay script for n seconds after conditions met
    0;//disabled after first use, 0=no, 1=yes
    begin_conditions;
    37;//condition
    0.000000;//condition parameter0
    0.000000;//condition parameter1
    11;//condition
    210.000000;//condition parameter0
    0.000000;//condition parameter1
    end_conditions;
    begin_effects;
    45;//effect number
    83.000000;//parameter1
    15.000000;//parameter2
    83.000000;//parameter3
    0.000000;//parameter4
    4;//effect number
    5.000000;//parameter1
    1.000000;//parameter2
    1.000000;//parameter3
    0.000000;//parameter4
    end_effects;
    Charge Laser Fail;//name
    65;//identifier
    1;//run without calling (set to 0 if you use the script for example as a wield script)
    0;//call position, 0=player location, 1=mouse location
    0;//calling creature 0=player, 1=creature nearest to the mouse, 2=player controlled creature
    1;//run every n milliseconds
    ;//message
    0;//message type, 0=quick message, 1=journal
    ;//sound, none for nothing
    0;//delay script for n seconds after conditions met
    0;//disabled after first use, 0=no, 1=yes
    begin_conditions;
    11;//condition
    210.000000;//condition parameter0
    0.000000;//condition parameter1
    5;//condition
    1.000000;//condition parameter0
    100.000000;//condition parameter1
    37;//condition
    0.000000;//condition parameter0
    1.000000;//condition parameter1
    end_conditions;
    begin_effects;
    4;//effect number
    -999.000000;//parameter1
    1.000000;//parameter2
    1.000000;//parameter3
    0.000000;//parameter4
    end_effects;
    Charge Laser Release;//name
    66;//identifier
    1;//run without calling (set to 0 if you use the script for example as a wield script)
    0;//call position, 0=player location, 1=mouse location
    0;//calling creature 0=player, 1=creature nearest to the mouse, 2=player controlled creature
    1;//run every n milliseconds
    ;//message
    0;//message type, 0=quick message, 1=journal
    ;//sound, none for nothing
    0;//delay script for n seconds after conditions met
    0;//disabled after first use, 0=no, 1=yes
    begin_conditions;
    11;//condition
    210.000000;//condition parameter0
    0.000000;//condition parameter1
    3;//condition
    1.000000;//condition parameter0
    100.000000;//condition parameter1
    37;//condition
    0.000000;//condition parameter0
    1.000000;//condition parameter1
    end_conditions;
    begin_effects;
    4;//effect number
    -999.000000;//parameter1
    1.000000;//parameter2
    1.000000;//parameter3
    0.000000;//parameter4
    24;//effect number
    56.000000;//parameter1
    1.000000;//parameter2
    0.000000;//parameter3
    0.000000;//parameter4
    end_effects;

    any chance to implement something like a spoiler feature into this forum (click to view/expand)?
    #
    TNN17 4 years ago
    #1: You have these scripts running all the time, rather than as Wield scripts on the weapon. Is this intentional? You could save a script-run and a condition if you just associated it with the weapon's item itself.

    #2: Part of the problem here is probably your run-time. If you're running this script every millisecond, then it will trigger every "tick" of the game. You'll rarely slide in between two milliseconds after all. You might have more luck expanding it to run every "500" instead of "1". You'll still have the unlucky occasion where the game will check exactly on that millisecond and you'll start charging your laser instead of firing for half a second, but that would leave a much larger window to deal with.

    Second possibility: Holding fire always increases the charge bar.

    Don't stop the weapon from firing unless the charge bar > say... 10.

    So if you gain 0.1 charge per ms, and fire once per ms (assuming solid laser beam here and that you're keeping the 1ms runtime), then after 100ms you'll enter Charge Mode, disable weapons for 2ms (this is going to stop the laser from firing until you stop holding LMB), fire your "charge" SFX, and then at 100, fire your Charged Bolt once and reset your charge meter.

    This will guarantee your ability to fire for at least 100ms before disabling your laser. You can slow down the charge method to enable a full second, or however you'd like to roll with this, but that'll do it for you.
    #
    Anne 4 years ago
    YinYin Falcon said:
    ...any chance to implement something like a spoiler feature into this forum (click to view/expand)?

    Wow - I surprised myself, and amazingly happened to spot your question about spoiler tagging.

    The expandable spoiler tag is not a bad idea. We do have a spoiler of a sort, but it only covers the part of text you want to hide, and doesn't decrease it's size. Here's how it works. It's not possible for Ville to implement forum software right now (too busy with Driftmoon at the moment), but we'll take note of it, and consider implementing it later!

    By the way, it's nice to notice there are these cool Notrium mods on the way! You really do have to have a lot of talent to mod Notrium - it's about a million times harder than modding Driftmoon.
    #
    YinYin Falcon 4 years ago
    TNN17 said:
    #1: You have these scripts running all the time, rather than as Wield scripts on the weapon. Is this intentional? You could save a script-run and a condition if you just associated it with the weapon's item itself.
    when I added it inside the item itself it only ran once upon equipping it - I guess I just did it wrong or don't know how to do a proper wield script yet.
    TNN17 said:
    #2: Part of the problem here is probably your run-time. If you're running this script every millisecond, then it will trigger every "tick" of the game. You'll rarely slide in between two milliseconds after all. You might have more luck expanding it to run every "500" instead of "1". You'll still have the unlucky occasion where the game will check exactly on that millisecond and you'll start charging your laser instead of firing for half a second, but that would leave a much larger window to deal with.
    I did experiment with higher timing but these were a little too jerky for my taste (sometimes charging beyond holding the button and other weird stuff) so I tried extremely smooth charging. Also I didn't want this whole feature to be about luck. For better use and maybe eliminating some of these problems I thought about adding a delay between first shot and starting the charge (a time where you only hold your mouse and nothing happens). This would prevent the charge from starting right away when you simply did a pretty long single click and no true holding and it won't mess with the weapon right away. I just don't know how to do it.

    Wait a second this is just what you described there secondly ... that's great. Will try it.

    Anne said:
    Wow - I surprised myself, and amazingly happened to spot your question about spoiler tagging.
    The expandable spoiler tag is not a bad idea. [...] we'll take note of it, and consider implementing it later!
    thanks, it'll help making the forum a lot more readable when it comes to quoting and posting scripts.
    Anne said:
    You really do have to have a lot of talent to mod Notrium - it's about a million times harder than modding Driftmoon.
    I am only getting into it myself and with the notrium mod viewer it is actually incredible easy (compared to the modding I usually do).
    #
    INFERNUS 4 years ago
    For better use and maybe eliminating some of these problems I thought about adding a delay between first shot and starting the charge (a time where you only hold your mouse and nothing happens). This would prevent the charge from starting right away when you simply did a pretty long single click and no true holding and it won't mess with the weapon right away. I just don't know how to do it.

    You can try with effect 23


    Laser;//name---------------------------------------(script that fires laser)
    0;//identifier
    0;//class
    bullet0.png;//bullet texture
    1;//bullets at one shot
    0;//stop at hit 0=stop where hit, 1=don't stop
    1.000000;//bullet size
    0.000000;//spread
    1.700000;//bullet speed
    500.000000;//time until bullet disappears
    500;//fire rate
    0;//trace 0=no trace, 1=blue beam, 2=bullet trace, 3=red beam, 4=green beam, 5=yellow
    -1;//hit visual effect colour, -1=nothing 0=?, 1=red, 2=green, 3=blue
    0;//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
    none;//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;
    23;//effect number
    -999.000000;//parameter1-----charge bar wont increase
    -1.000000;//parameter2---(creature visual effect from weapon)you can add smoke particles
    0.000000;//parameter3------charge bar
    5000.000000;//parameter4-------reload (prevent the charge) time in milisec.
    end_fire_effects;
    begin_hit_effects;
    4;//effect number
    0.000000;//parameter1
    0.000000;//parameter2
    0.000000;//parameter3
    0.000000;//parameter4
    end_hit_effects;


    or you can add another bar (prevent charge)
    with script which checks
    script 1
    -if weapon is fired.
    add X to prevent charge bar

    script 2
    -if bar is lower than Y
    reduce X prevent charge bar

    and to weapons add condition in

    begin_wield_conditions;
    5;//condition
    0.000000;//condition parameter0---prevent charge bar
    0.000001;//condition parameter1---if prevent charge bar is 0
    end_wield_conditions;

    By the way, it's nice to notice there are these cool Notrium mods on the way! You really do have to have a lot of talent to mod Notrium

    Tnx




    Edited 4 years ago
    #
    TNN17 4 years ago
    Anne said:
    By the way, it's nice to notice there are these cool Notrium mods on the way! You really do have to have a lot of talent to mod Notrium - it's about a million times harder than modding Driftmoon.

    Thanks a lot. Having spent approximately fifty four hours coding trees, I'm inclined to agree.

    YinYin Falcon said:
    when I added it inside the item itself it only ran once upon equipping it - I guess I just did it wrong or don't know how to do a proper wield script yet.

    Weird. I use this exact script with my sleep scripting:

    Sleeping - Slowed;//name
    273;//identifier
    0;//run without calling (set to 0 if you use the script for example as a wield script)
    0;//call position, 0=player location, 1=mouse location
    0;//calling creature 0=player, 1=creature nearest to the mouse, 2=player controlled creature
    10;//run every n milliseconds
    none;//message
    0;//message type, 0=quick message, 1=journal
    none;//sound, none for nothing
    0;//delay script for n seconds after conditions met
    0;//disabled after first use, 0=no, 1=yes
    begin_conditions;
    end_conditions;
    begin_effects;
    1;//effect number
    101.000000;//parameter1
    -1.000000;//parameter2
    0.000000;//parameter3
    0.000000;//parameter4
    45;//effect number
    -1.000000;//parameter1
    101.000000;//parameter2
    -1.000000;//parameter3
    0.000000;//parameter4
    end_effects;


    You're welcome to strip it down to 1 ms and remove the effect 1 from this if you want, it shouldn't be much different to what you have already.

    This may be obvious, but I assume you've got the item an equip slot assigned?
    #
    YinYin Falcon 4 years ago
    YinYin Falcon said:
    don't know how to do a proper wield script yet.
    I really did overlook the wield script slot and instead had the script run when equipping the weapon (thus only once). That's why I switched to running all the time. Anyway this makes a lot of things a lot easier.
    Also stumbled across making a smooth looking glass = camera follows your mouse anywhere.
    And turning the player blue when wearing the enhanced power armor was easy with this as well.
    Is it possible to do other colors than blue/red/green with a weapon effect?
    TNN17 said:
    Second possibility: Holding fire always increases the charge bar.

    Don't stop the weapon from firing unless the charge bar > say... 10.

    So if you gain 0.1 charge per ms, and fire once per ms (assuming solid laser beam here and that you're keeping the 1ms runtime), then after 100ms you'll enter Charge Mode, disable weapons for 2ms (this is going to stop the laser from firing until you stop holding LMB), fire your "charge" SFX, and then at 100, fire your Charged Bolt once and reset your charge meter.

    This will guarantee your ability to fire for at least 100ms before disabling your laser. You can slow down the charge method to enable a full second, or however you'd like to roll with this, but that'll do it for you.
    Works like a charm now. Time to fine tune it.
    Charge bar, charge particles, charged shot, charge sound, item image, ... I still have to create everything for it.

    Some questions about bars:
    Is it possible to display a vertical bar?
    And is it possible to have a bar anchored to a center (top/left/right/bottom) rather than a corner?

    edit:
    While refining I had to find out that inside the Charge Laser Release script the fire weapon effect ignores the creatures weapon x/y coordinates and instead fires from the players center ...
    I would rather want it fired from the gun, but how?
    Same with particles ...

    Edited 4 years ago
    #
    TNN17 4 years ago
    YinYin Falcon said:
    [I really did overlook the wield script slot and instead had the script run when equipping the weapon (thus only once).

    There we are, glad to hear it.

    Also stumbled across making a smooth looking glass = camera follows your mouse anywhere.

    Oh aye? I'll be keeping an eye out for this, that sounds ideal for the sniper rifle as well.

    Is it possible to do other colors than blue/red/green with a weapon effect?

    I believe these are hard coded.

    Some questions about bars:
    Is it possible to display a vertical bar?

    Hard coded, I tried this myself.

    And is it possible to have a bar anchored to a center (top/left/right/bottom) rather than a corner?

    Anchored is essentially where the bar starts out, with high enough offsets you can get it into the middle of the screen or anywhere else. There's no non-corner based anchor though.

    While refining I had to find out that inside the Charge Laser Release script the fire weapon effect ignores the creatures weapon x/y coordinates and instead fires from the players center ...
    I would rather want it fired from the gun, but how?
    Same with particles ...

    1) Fire particles with a weapon with particle firing effects, rather than a fire particles effect.
    2) Use Effect 66 instead of 24? This lets you set offsets. I assume it automatically uses the default facing to do so.
    #
    YinYin Falcon 4 years ago
    TNN17 said:
    Oh aye? I'll be keeping an eye out for this, that sounds ideal for the sniper rifle as well.
    Looking Glass;//name
    70;//identifier
    0;//run without calling (set to 0 if you use the script for example as a wield script)
    1;//call position, 0=player location, 1=mouse location
    2;//calling creature 0=player, 1=creature nearest to the mouse, 2=player controlled creature
    0;//run every n milliseconds
    ;//message
    0;//message type, 0=quick message, 1=journal
    ;//sound, none for nothing
    0;//delay script for n seconds after conditions met
    0;//disabled after first use, 0=no, 1=yes
    begin_conditions;
    end_conditions;
    begin_effects;
    49;//effect number
    1.000000;//parameter1
    0.000000;//parameter2
    100.000000;//parameter3
    0.000000;//parameter4
    end_effects;
    This is pretty sensitive depending on your mouse settings because it follows the mouse directly. Is it possible to make a creature follow the mouse? Then we could attach the camera to an invisible creature and thus modify the speed of the camera.
    And yes this makes the sniper actually useful.
    edit: the creature could also allow us to add a light that shapes the view as if looking through the scope.
    TNN17 said:
    1) Fire particles with a weapon with particle firing effects, rather than a fire particles effect.
    2) Use Effect 66 instead of 24? This lets you set offsets. I assume it automatically uses the default facing to do so.
    so I now have quite a few weapons firing particles with their own specifications for all charging effects:

    works pretty well except for that flickering.
    I know this is obviously because I have some wrong timing there, but I need to have it real tight for the charge to stick to the gun and not trail behind when walking (maybe I should switch to the flash light attaching?). The weird thing is that, when using this charge too often or for too long the small and big bulb (charging and finished charge) don't appear anymore (the little charge finished animation always occurs). And when I try to fix the timing I get the problem right from the start.

    Right now I am using 7 scripts for all of this:
    one wield script that calls three mouse checking scripts
    mouse pressed script raising the charge
    mouse not pressed with enough charge fires charged shot
    mouse not pressed without enough charge depletes charge
    low charge disabling the weapon and spawning particles
    charge finished spawning a special animation
    full charge spawning larger particles

    I will investigate a little further myself before posting this code wall.

    Edited 4 years ago
    #
    TNN17 4 years ago
    Alright, if you have no joy, why not get a copy up? It's a lot easier to look at something in NMV and we can actually see the thing in action, which is going to be clearer than any description.
    #
    INFERNUS 4 years ago
    Did anyone had problems with massive lag (game freezes for 10-20 sec) when you enter new area?
    #
    TNN17 4 years ago
    Only when I have too many scripts running at 1ms. It's usually pretty quick otherwise, even with my tree-filled maps.
    #
    INFERNUS 4 years ago
    I only have small area with few trees and creatures and it lags when I enter it.
    #
    TNN17 4 years ago
    Any Creature scripts? Tree scripts? Plot Objects with time-based activations?
    #
    INFERNUS 4 years ago
    TNN17 said:
    Any Creature scripts? Tree scripts? Plot Objects with time-based activations?




    there are creature scripts and tree scripts... but it is very small map
    #
    YinYin Falcon 4 years ago
    hmm - the size of the map is not the point here
    i have managed to slow my game only with my charge laser scripts
    inside the escape pod
    #
    INFERNUS 4 years ago
    my 3 maps have the same scripts there but only 1 map is lagging when I enter it
    #
    Josh (guest) 1 year ago
    Well, back to Notrium modding I guess...

    If there are 3 player bars defined:
    bar_a
    bar_b
    and bar_c

    Is it possible that bar_c = (bar_a + bar_b)?

    I can't find anything similar to that in the effects list.
    #
    MageKing17 1 year ago
    Set it to 0 and then increase it by bar_a and bar_b.
    #
    Josh (guest) 1 year ago
    Works like a charm! Thanks.
    Effect 28 did the job.
    #
    Josh (guest) 1 year ago
    Hey again.
    I'm having trouble understanding how anger level related stuff works.

    This is the description from AI_tactic.dat:

    Anger counts the annoyance level of the creature. When enemies are visible,
    the anger level will increase. When the creature gets hit, the anger is at
    the topmost level. The different anger levels control the creatures actions.
    A peaceful creature might stay put, and attack when it's anger level increases.

    Anger level is the size of each level, the number is automatically
    scaled in the game relative to the other levels in the same tactic.
    The topmost level will be activated when creature isn't angry at
    all, the lowest level will be activated at maximum anger.

    Sleep;//tactic name
    6;//identifier
    begin_levels;
    1000;//anger level size---Do Nothing
    0;//action
    0;//parameter0
    0;//can hit enemies
    0;//can eat
    1;//anger level size---Attack
    3;//action
    0;//parameter0
    1;//can hit enemies
    0;//can eat
    end_levels;


    If I set the anger level of do nothing action to 1000, and attack to 1, he wont switch to attack action even though he got hit with a weapon multiple times.
    If I set the anger level of do nothing action to 1000, and attack to 10, he will switch to attack action as soon as he sees me.

    What I want is, that his anger level is high enough so it wont affect him seeing me, but hearing weapons will.

    Also:
    1.000000;//AI hear volume, the amount of anger the AI gets when it hears the weapon

    Does 1.0 = 100% Anger Level?

      1000.000000;//AI hear range

      500.000000;//AI see range

    Is this in pixels?

      4.000000;//AI see angle

    Is this inĀ°?

    I would appreciate it if someone could clear this up to me.
    Thanks.
    #
    addse1115 1 year ago
    Hello, I am a newbie around here.
    I am so glad to see useful posts here.
    Thanks for the welcome.
    #
    Forum » Notrium modding questions/answers
  • « previous
  • 1
  • 28
  • 29
  • 30
  • 31
  • » next
  • Post Reply


    Your email:
    Your name: