Results 1 to 10 of 10

Thread: Question about the Random parameter

  
  1. #1
    Demon Spawn UnknownMaster21's Avatar
    Join Date
    Jul 2010
    Location
    Finland
    Posts
    187

    Default Question about the Random parameter

    Will this work?

    Code:
    ADD_CREATURE_TO_LEVEL(PLAYER_GOOD,RANDOM,-2,5,10,0)
    Code:
    CREATE_PARTY(RANDOM)
    ADD_TO_PARTY(RANDOM,RANDOM,RANDOM,0,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(RANDOM,RANDOM,RANDOM,0,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(RANDOM,RANDOM,RANDOM,0,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(RANDOM,RANDOM,RANDOM,0,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(RANDOM,RANDOM,RANDOM,0,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(RANDOM,RANDOM,RANDOM,0,ATTACK_DUNGEON_HEART,0)
    ADD_TO_PARTY(RANDOM,RANDOM,RANDOM,0,ATTACK_DUNGEON_HEART,0)
    As I tried, nothing happened really... did I made something wrong or, what?

  2. #2

    Default Re: Question about the Random parameter

    The add_to_party command does not accept random creatures.

    Also, you try to spawn a party with an 'add_creature_to_level' command.

    This works:
    Code:
    CREATE_PARTY("RANDOM")
    ADD_TO_PARTY("RANDOM",MONK,RANDOM(1,10),0,ATTACK_DUNGEON_HEART,0)
    
    ADD_PARTY_TO_LEVEL(PLAYER_GOOD,"RANDOM",1,1)

  3. #3
    Demon Spawn UnknownMaster21's Avatar
    Join Date
    Jul 2010
    Location
    Finland
    Posts
    187

    Default Re: Question about the Random parameter

    Yeah, good! Doing final missions of oncoming campaign. Bonus levels needs to be a random thingy

    OFFTopic:
    I have downloaded latest patch and... I think now my campaign is impossible!!! Everything changed up!

    But no worries, I make a fix

    I had used nb 1456, now nb 1604

  4. #4

    Default Re: Question about the Random parameter

    What changed in those versions that made an impact for you?

    There are quite a few random things possible, for example:

    * Random amount of creatures available
    * Random rooms available
    * Random party drop locations
    * Random sizes of hero parties
    * Random timings on triggers
    * Random levels of creatures

  5. #5
    Demon Spawn UnknownMaster21's Avatar
    Join Date
    Jul 2010
    Location
    Finland
    Posts
    187

    Default Re: Question about the Random parameter

    Maybe it was an imagination but quick_information blinks now.

    Is there a link where to see a log about what is changed in what patch?

    Is there anything changed about computer behaviour? Maybe it is only me, but computer reacts much "smoother" and more effectively

    more than 130 patches upgraded, there must be something changed


    EDIT: Nevermind, found it... Never even seen this one before


    EDIT: Horny is nerfed and CP casts CTA spell more properly. This is the reason, why maps goes nearly impossible. I have created mapplay wrongly. Have to fix it.
    Last edited by UnknownMaster21; February 24th, 2015 at 18:00.

  6. #6

    Default Re: Question about the Random parameter

    I remember you saying once that when a value had been chosen at random, it would stay the same for the remainder of the level. Is that still the case?

  7. #7
    KeeperFX Author mefistotelis's Avatar
    Join Date
    Sep 2009
    Location
    Poland
    Posts
    1,240

    Default Re: Question about the Random parameter

    Yes, RANDOM values are selected once at start.

    Also, if you want to select random item from a list (ie. creature model) - use just "RANDOM"; for numbers (ie. level) you must provide range (ie. "RANDOM(1,10)").

  8. #8

    Default Re: Question about the Random parameter

    Quote Originally Posted by UnknownMaster21 View Post
    Maybe it was an imagination but quick_information blinks now.

    Is there a link where to see a log about what is changed in what patch?

    Is there anything changed about computer behaviour? Maybe it is only me, but computer reacts much "smoother" and more effectively

    more than 130 patches upgraded, there must be something changed


    EDIT: Nevermind, found it... Never even seen this one before
    EDIT: Horny is nerfed and CP casts CTA spell more properly. This is the reason, why maps goes nearly impossible. I have created mapplay wrongly. Have to fix it.
    Yes, 130 changes, but there are not that many that affect game-play. But indeed, Horny has been nerfed back a bit, there was a recent change that made him far to powerful(One horny could almost solo an avatar), that has been brought back in line. Horny is still far more powerful now than in basis 0.4.5 and at level 10 over 10 times more powerful than he was at level 10 in vanilla keeper.

    CP using CTA now is indeed very different, it is great and results in the CP now sometimes actually attacking the player. Unfortunately at the moment he still doesn't quite know when to turn CTA off.

    Unread quick_information messages now blink, yes, just like they did the original game and just like display_information messages. They stop blinking when you read them.

    Here is the full changelog: https://code.google.com/p/keeperfx/source/list

    Quote Originally Posted by mefistotelis View Post
    Yes, RANDOM values are selected once at start.

    Also, if you want to select random item from a list (ie. creature model) - use just "RANDOM"; for numbers (ie. level) you must provide range (ie. "RANDOM(1,10)").
    You do know right that in many cases where you use "RANDOM" for a creature it gives an error wanting more parameters?

    For example, these don't work:
    Code:
    ADD_TO_PARTY(HELLO,RANDOM,10,0,ATTACK_DUNGEON_HEART,0)
    KILL_CREATURE(​PLAYER0,RANDOM,MOST_EXPERIENCED,​1)

  9. #9
    Demon Spawn
    Join Date
    Mar 2013
    Location
    Cardiff, UK
    Posts
    182

    Default Re: Question about the Random parameter

    I think we need a way to randomly 'kill' creatures, as a tool for preventing too many creatures from inhabiting a map. Some mechanism that allowed the weakest or lowest ranking creatures to be chosen first maybe? Probably a new script instruction?

    Also, there was talk of a dynamically random variable being added, so we could have multiple random values within a script? While I'm greedy, how about universal flags that exist within a campaign instead of a single map? So events in map2 can be influenced by what you did in map1?

    dayokay

  10. #10
    KeeperFX Author mefistotelis's Avatar
    Join Date
    Sep 2009
    Location
    Poland
    Posts
    1,240

    Default Re: Question about the Random parameter

    Quote Originally Posted by YourMaster View Post
    You do know right that in many cases where you use "RANDOM" for a creature it gives an error wanting more parameters?
    Ok, now I know.
    Yes, I can see how the implementation is wrong.

Similar Threads

  1. "Natural death kind" parameter
    By friscmanseby in forum KeeperFX
    Replies: 1
    Last Post: September 24th, 2012, 07:25
  2. Problems with parameter -32bitdisplay
    By LouisdeFuines in forum DK2 Troubleshooting
    Replies: 2
    Last Post: December 27th, 2011, 11:20
  3. random map
    By fantasm0 in forum War for the Overworld
    Replies: 4
    Last Post: June 21st, 2011, 03:19
  4. Random freezing.
    By HellsFait in forum KeeperFX
    Replies: 1
    Last Post: February 19th, 2011, 20:45
  5. Random stuff
    By dk2player in forum Silly
    Replies: 91
    Last Post: April 6th, 2010, 20:37

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •