Register
Email: Password:
Forum » Notrium modding questions/answers
  • « previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 31
  • » next
  • Notrium modding questions/answers

    Grim Reaper 19 years ago
    That brings a question in mind...

    Can creatures in layer X attack creatures in layer Y? If they can, then is there any way to prevent this from happening?
    #
    Eternal 19 years ago
    "Grim Reaper" said:
    That brings a question in mind...

    Can creatures in layer X attack creatures in layer Y? If they can, then is there any way to prevent this from happening?

    Good point, but I think I might have a completley dodgy "solution" that will most probably break my notrium. I'll edit this post with the results.

    EDIT: Didn't work, couldn't find a way to teleport the player to the location of a bullet..... I was trying to make a 'jump' button, which would basically make the player jump "up" a layer and land on either anything on the layer above, or back down onto the layer he started on.

    So, not being able to do that, I tried to make a normal jump (i.e. over obstacles and the like) so I made a script that fired a weapon, and tried to make it so that it moved the player to the location of the bullet (possibly a creature) after X seconds (however long I want my jump to last).

    Basically just teleporting the player forwards a bit. I might'ov made the player invisible (somehow) and made the bullet the same texture as the player, and then make the player reappear once he had "landed"(so that it looked like he was jumping, not just firing a gun ). Any ideas on how to change layers or get my jump working???

    Anyway I need some sleep, night all!! (5am here :S)
    #
    Doogsy 19 years ago
    Ok, I'm trying to make a torch which burns out after 60 seconds, and the torch dissapears once its used up. At the moment, first I tried just calling a script that waits 60 seconds before it activates, but that doesn't work. So then I set up a bar. When the torch is weilded, 60 is added to the bar and then the weild script takes 1 off the bar every second. It also has a weild item disable script so when the bar reaches 0, it turns the light off. However this method doesnt get rid of the torch from the inventory.
    I'm sure there is a simple method yet the answer is eluding me.
    #
    MageKing17 19 years ago
    "Doogsy" said:
    Ok, I'm trying to make a torch which burns out after 60 seconds, and the torch dissapears once its used up. At the moment, first I tried just calling a script that waits 60 seconds before it activates, but that doesn't work. So then I set up a bar. When the torch is weilded, 60 is added to the bar and then the weild script takes 1 off the bar every second. It also has a weild item disable script so when the bar reaches 0, it turns the light off. However this method doesnt get rid of the torch from the inventory.
    I'm sure there is a simple method yet the answer is eluding me.
    Wielded item disabling scripts check for conditions only, not effects.
    #
    Doogsy 19 years ago
    I know, but I'm looking for a way to thats why I am posting here, I'm looking for some other way to do what I'm trying to do.
    #
    Casanova 19 years ago
    Why not add another script that checks if the bar has reached 0 and then removes the used torch? Make it run every second, start disabled, and be activated when the torch is used.
    #
    Doogsy 19 years ago
    I see, I knew it would be a simple answer. Thank you
    #
    Unc1354m 19 years ago
    ok, another question.. ops: two actually

    1: i doubt this is possible, but ill ask anyway, Is there any possible way, to make it if you get close enough to an enemy ship, you right click on it to board it, all ones leading to the same place

    2:, is it possible to make, it that you can take over other ships, and then control them, and you can switch between them. E.G, switch to a sloop, and the Brig will follow, and then a hotkey or something to change ships
    #
    eug1404 19 years ago
    "Unc1354m" said:
    ok, another question.. ops: two actually

    1: i doubt this is possible, but ill ask anyway, Is there any possible way, to make it if you get close enough to an enemy ship, you right click on it to board it, all ones leading to the same place
    Yes, just have them all lead to the same map, but you'll need to use some scripts/invisible bars(a.k.a Notriums version of Variables ) to remember where it came from, check the Wazzal II mod for examples.
    "Unc1354m" said:

    2:, is it possible to make, it that you can take over other ships, and then control them, and you can switch between them. E.G, switch to a sloop, and the Brig will follow, and then a hotkey or something to change ships

    Sure just have it switch the player race(well that's the cheapest method), for some examples take a look at the Opposing Force mod, and in particular the Tank you can drive.
    #
    ville 19 years ago
    "Eternal" said:
    I'm curious, is there anyway to change the Layer the player or a creature is on (in-game that is)? I'm doing a little experimenting..

    No layering support for creatures in Notrium, except for the graphics. They're all essentially at the ground level when talking about collision detection. You might be able to simulate some of the behaviour by disabling collision detection for a creature type, then switching the player to this creature type when he is jumping.
    #
    B0rsuk 19 years ago
    Is there any way I can prevent weapon from being changed ? You see, I'm thinking about rapid fire pistol with various fire modes etc and this would come in handy. I don't want someone change weapon in middle of burst, it would look silly.
    #
    MageKing17 19 years ago
    "B0rsuk" said:
    Is there any way I can prevent weapon from being changed ? You see, I'm thinking about rapid fire pistol with various fire modes etc and this would come in handy. I don't want someone change weapon in middle of burst, it would look silly.
    Why not just make it that the mouse has to be held down for the entire burst? That way, switching mid-burst causes it to stop firing. Or do you not want that to happen either?

    Check the Opposing Force mod for the latest work on special weapon effects, though.
    #
    B0rsuk 19 years ago
    How about walls which work one side only ? You could pass from left to right, but not from right to left. Stopping bullets not necessary...
    I'm thinking about big Aztec-style "step" pyramids...
    #
    Quanrian 19 years ago
    "B0rsuk" said:
    How about walls which work one side only ? You could pass from left to right, but not from right to left. Stopping bullets not necessary...
    I'm thinking about big Aztec-style "step" pyramids...

    The only thing I can think of to the effect of what you're saying is in old puzzle games like Lolo where a block can only be passed in one direction. The problem with that in Notrium is that there is no way to check a player's direction. The only remote thing that pops into mind is some kind of conveyor belt effect where you force them in x direction when they step onto the plot object.
    #
    Doogsy 19 years ago
    If I were to change all trees to plot objects, rather than just object definitions, would this slow down the game considerably or not?

    And with creature AI tactics, if the creature is not on your side (ie you can't change between the 2 tactics) Does the creature cycle between them itself or just stick to tactic one (or something completly different)?
    #
    Quanrian 19 years ago
    "Doogsy" said:
    If I were to change all trees to plot objects, rather than just object definitions, would this slow down the game considerably or not?

    And with creature AI tactics, if the creature is not on your side (ie you can't change between the 2 tactics) Does the creature cycle between them itself or just stick to tactic one (or something completly different)?

    To your first question, it probably will to some degree because I'm guessing there will be effects and conditions attached to the plot object. So the fact it's simply doing more calculations may slow things down. It's probably something you'd have to play with a bit so the reduction either isn't severe or at least not noticable.

    To your second question, non-player creatures that you do not control will never change their AI tactics, they will always use the first AI tactic. So if you want them switching AI's you'll have to do that with an effect. You'll always want to make the change to the primary AI of course if they're never going to be controlled by the player.
    #
    ville 19 years ago
    "Doogsy" said:
    If I were to change all trees to plot objects, rather than just object definitions, would this slow down the game considerably or not?

    It will to some degree. Not much, but a bit.
    #
    Doogsy 19 years ago
    Ok. Is there any other way to make a creature (non player) intereact/recognise that its close to a tree? If the slowdown isnt much then I guess its ok.
    #
    Quanrian 19 years ago
    Not that I'm aware of. You can have them check if they're near an item, but really your choices are: creature, plot object, item. Using them as plot objects shouldn't create any signifigant slowdown however so you shouldn't have any real issue with it.
    #
    B0rsuk 19 years ago
    Would using "script chains" slow the game much ? For instance I may want to create weapon, which shoots 10 bullets in an arc, say 100 ms delay between scripts and each script shoots bullet in different direction...

    player presses fire>Script1 > Script2 > Script3 > ...Script10 > stop

    Is there any reason for not using this technique I should be aware of ?
    #
    Quanrian 19 years ago
    Using a script chain isn't going to be really all that more intensive for the engine than running those 10 script separate. The fact that they don't run at the same time is what will actually keep it reasonable. It's really how much is running at the same moment that can cause pockets of lag. Be aware when using the call script effect that the delays are nulled and the script is executed right away. I suggest instead using a bar or otherwise to trigger the other scripts in the proper order and with their delays intact.
    #
    ville 19 years ago
    It will even be faster than running ten separate scripts with separate conditions.
    #
    B0rsuk 19 years ago
    Will Notrium mod be compatible with future versions of Notrium ? Or I'll be forced to rewrite some/most/all of it ? Should I hold on with new mods ?

    Condition 11 bug is very annoying for me, and the one with "shoot random creature", too.

    Thanks for that tip on negated delays. I intended to use it in several places...
    #
    ZeXLR8er 19 years ago
    No, do it now. v1.3 won't be outdated for a looong time, and even then it will be just a minor fix to get your mod compatible.
    #
    B0rsuk 19 years ago
    I finally nailed a bug that made Life Support System appear instead of Life Support Chip in my mod.

    I'm more confused than happy.

    I learned hard way that I always need to type all 4 parameters (numbers) for effects/conditions. Or at least 2. Dunno how does it work actually.

    My former theory was that in cases where parameters are named parameter0 and 1, I need 2 parameters to make my Notrium not crash. (even if only one of them has any meaning, actually). And that in cases where they start with "parameter1", I need to list all four of them. I know I could explain more clearly, but it worked for a while. I was reading notes.txt and so on carefully.
    -------------
    I fixed my bug by giving 4 parameters to condition 7 (player is not race). It's supposed to take only one, but if you don't make 2 the game crashes. Moreover, If I didn't give 2 extra parameters, if I understand correctly, they were taken from next item from item.dat. So when I messed up Battery Extension, somehow it stopped "taking parameters" at Life Support System. More or less. Now I', puzzled, because in all other places condition 7 takes 2 parameters and it seems to work fine !

    I forgot one thing, to ask a question:

    1. How many parameters do conditions/effects actually need to work properly ?

    2. I know it's a bad idea to take graphics from other games, especially commercial, but how about sounds ? Is there risk of lawsuit or sth when I use sounds from commercial game ? The ones I think of are very distinguishable. I would go orgasmic if I could use them. I think about several sounds from Rune and Nox...

    3. Quanrian, you mentioned that I could fix my infrared vision (shows crates and barriers as creatures) by using "set light to creature" instead of "set light level addition" effect. Would that involve pasting something like "if player race is 5 (salamander), set light blah blah" into EVERY SINGLE TIMED BLOCK of every creature except barrier and crate ? I guess it would slow the game down... No better way ?
    #
    ville 19 years ago
    "B0rsuk" said:
    Will Notrium mod be compatible with future versions of Notrium ? Or I'll be forced to rewrite some/most/all of it ? Should I hold on with new mods ?

    Everything will remain compatible, I don't want to discourage any modding with new versions. Of course this severely limits what can be added into the game.

    "B0rsuk" said:
    Condition 11 bug is very annoying for me, and the one with "shoot random creature", too.

    Isn't that one fixed in the 1.34 test version?

    "B0rsuk" said:

    I fixed my bug by giving 4 parameters to condition 7 (player is not race). It's supposed to take only one, but if you don't make 2 the game crashes. Moreover, If I didn't give 2 extra parameters, if I understand correctly, they were taken from next item from item.dat. So when I messed up Battery Extension, somehow it stopped "taking parameters" at Life Support System. More or less. Now I', puzzled, because in all other places condition 7 takes 2 parameters and it seems to work fine !

    Wow, how can it work like that? It should crash immediately with the wrong number of parameters.

    "B0rsuk" said:

    1. How many parameters do conditions/effects actually need to work properly ?

    As far as I can recall, all effects have this format:
    3;//effect number
    1.000000;//parameter1
    1.000000;//parameter2
    0.000000;//parameter3
    0.000000;//parameter4

    And all conditions have this format:
    0;//condition
    82.000000;//condition parameter0
    1.000000;//condition parameter1

    If you have any other number of parameters, it shouldn't work at all. Most likely it will not load any of the items you have in the data file after the fault.

    "B0rsuk" said:

    2. I know it's a bad idea to take graphics from other games, especially commercial, but how about sounds ? Is there risk of lawsuit or sth when I use sounds from commercial game ? The ones I think of are very distinguishable. I would go orgasmic if I could use them. I think about several sounds from Rune and Nox...

    I wouldn't use them, the same laws apply to sounds as do to graphics. They won't probably sue you, but they might ask you to kindly remove the sounds.
    #
    B0rsuk 19 years ago
    "Ville" said:
    Everything will remain compatible, I don't want to discourage any modding with new versions. Of course this severely limits what can be added into the game.

    I see your point. Any chance of Notrium2 somewhere in future, then ? I'll better backup this question with some mods, first...

    "Ville" said:
    Isn't that one fixed in the 1.34 test version?

    Dunno. So far my own bugs are enough for me. And I've got journal to finish, and so many ideas so little time...Perhaps you're right, I'm going to check it...

    "Ville" said:

    Wow, how can it work like that? It should crash immediately with the wrong number of parameters.

    I'll tell you. Stupid B0rsuk just realised he placed it BETWEEN END CONDITIONS AND BEGIN EFFECTS. This must've been causing the bug all along. Let me check... yes, it works with just 2 parameters!

    "Ville" said:

    I wouldn't use them, the same laws apply to sounds as do to graphics. They won't probably sue you, but they might ask you to kindly remove the sounds.

    As I expected. Findsounds.com should suffice.
    #
    MageKing17 19 years ago
    "ville" said:
    Wow, how can it work like that? It should crash immediately with the wrong number of parameters.
    Notrium is actually quite stable on my computer. It very rarely crashes, even when something is horribly wrong. Remember in Wazzal II, ZeX had the primary AI for his bodyguards set to something that didn't exist and it caused the game to crash? Well, I got the 1.34 prerelease, and the game DIDN'T CRASH when the bodyguards spawned. It did a while later, when I tried to move my mousecursor over one of them (to change his tactics). Now I find Notrium can support all sorts of bad references and still run the game, although you might get unexpected side-effects. I even referenced a soundfile that didn't exist, right? Nothing happened. It didn't crash, didn't give an error, just played the game. It didn't even mess up anything related to the bad reference. Your engine is very stable now.
    #
    Doogsy 19 years ago
    Same happens for graphics too, notrium uses a filler graphicso it doesnt crash. I think while it makes the engine stable, it can also be dangerous, as modders can be left with the false immpression that there is nothing wrong with thier mod.
    #
    MageKing17 19 years ago
    "Doogsy" said:
    Same happens for graphics too, notrium uses a filler graphicso it doesnt crash. I think while it makes the engine stable, it can also be dangerous, as modders can be left with the false immpression that there is nothing wrong with thier mod.
    Then just be extra careful when checking your code.
    #
    ville 19 years ago
    And remember to read the log file. It tells you if Notrium is looking for something and cannot find it. You can easily do a search for the word "error" in it.
    #
    UberWaffe 19 years ago
    I have a few questions:
    1- How many scripts can run before it will slow the game? I am running quite a few timed scripts with around 1000msec (1 sec) delays and it hasn't hampered performance yet. I'm just curious as to how badly it can be pushed. (But my brain tells me that it wouldn't affect the game that badly if at all.)

    2-Is there currently any way to set one BAR to the EXACT value of another BAR? I haven't seen an effect that can do that. (Only ADD one bar's value to another.) Am I just looking past the effect or doesn't one like that exist? (Is there another relatively short way of doing this?)
    The reason I ask is because I wish to make evasion. I wanted to do this my adding a new invisible bar that is constantly set to the currently value of the health bar. Then in the creature hit block I wanted to add a random value = to 0 condition to give 20% of success. If successful then it sets the health bar back to the last updated value of the invisible bar. (Thus simulating evasion). It is easier than adding an condition to all weapons. (Which, because evasion should only apply to certain units, with diffirent % chances, would be close to impossible.)

    Any help would be greatly appreciated.
    #
    Toko 19 years ago
    i cant scale stuff down..i tried in object_definitions.dat to scale apples down but it is still in the same size...can some one help me?
    #
    Grim Reaper 19 years ago
    "UberWaffe" said:
    2-Is there currently any way to set one BAR to the EXACT value of another BAR? I haven't seen an effect that can do that. (Only ADD one bar's value to another.) Am I just looking past the effect or doesn't one like that exist? (Is there another relatively short way of doing this?)
    The reason I ask is because I wish to make evasion. I wanted to do this my adding a new invisible bar that is constantly set to the currently value of the health bar. Then in the creature hit block I wanted to add a random value = to 0 condition to give 20% of success. If successful then it sets the health bar back to the last updated value of the invisible bar. (Thus simulating evasion). It is easier than adding an condition to all weapons. (Which, because evasion should only apply to certain units, with diffirent % chances, would be close to impossible.)

    Any help would be greatly appreciated.

    Perhaps you could change that BAR you want the value to be added in to 0 and then ADD the value of the BAR you want.
    #
    MageKing17 19 years ago
    "ville" said:
    And remember to read the log file. It tells you if Notrium is looking for something and cannot find it. You can easily do a search for the word "error" in it.
    I just scroll down to the bottom of the file, where the log stops. It will say something like "Started loading *.*" and I just check to make sure the file/item is correct.
    #
    Forum » Notrium modding questions/answers
  • « previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 31
  • » next
  • Post Reply


    Your email:
    Your name: