Results 1 to 10 of 10

Thread: show counter value

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default show counter value

    I want to make a victory condition by points like MTW1 whit events which increase counter numbers and when a faction have a certain amount it win.

    What I dont know how to do is show the value of the counter to the player like making a event which show every faction points.
    Last edited by wolf-yop; November 23, 2010 at 06:25 PM.

  2. #2
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: show counter value

    Here's a script for 0 - 100 points.

    Code:
    declare_counter points
    
    monitor_event ButtonPressed ButtonPressed faction_ranking_button
    	if I_CompareCounter points = 0
    		historic_event points_0
    	end_if
    	if I_CompareCounter points = 1
    		historic_event points_1
    	end_if
    	if I_CompareCounter points = 2
    		historic_event points_2
    	end_if
    	if I_CompareCounter points = 3
    		historic_event points_3
    	end_if
    	if I_CompareCounter points = 4
    		historic_event points_4
    	end_if
    	if I_CompareCounter points = 5
    		historic_event points_5
    	end_if
    	if I_CompareCounter points = 6
    		historic_event points_6
    	end_if
    	if I_CompareCounter points = 7
    		historic_event points_7
    	end_if
    	if I_CompareCounter points = 8
    		historic_event points_8
    	end_if
    	if I_CompareCounter points = 9
    		historic_event points_9
    	end_if
    	if I_CompareCounter points = 10
    		historic_event points_10
    	end_if
    	if I_CompareCounter points = 11
    		historic_event points_11
    	end_if
    	if I_CompareCounter points = 12
    		historic_event points_12
    	end_if
    	if I_CompareCounter points = 13
    		historic_event points_13
    	end_if
    	if I_CompareCounter points = 14
    		historic_event points_14
    	end_if
    	if I_CompareCounter points = 15
    		historic_event points_15
    	end_if
    	if I_CompareCounter points = 16
    		historic_event points_16
    	end_if
    	if I_CompareCounter points = 17
    		historic_event points_17
    	end_if
    	if I_CompareCounter points = 18
    		historic_event points_18
    	end_if
    	if I_CompareCounter points = 19
    		historic_event points_19
    	end_if
    	if I_CompareCounter points = 20
    		historic_event points_20
    	end_if
    	if I_CompareCounter points = 21
    		historic_event points_21
    	end_if
    	if I_CompareCounter points = 22
    		historic_event points_22
    	end_if
    	if I_CompareCounter points = 23
    		historic_event points_23
    	end_if
    	if I_CompareCounter points = 24
    		historic_event points_24
    	end_if
    	if I_CompareCounter points = 25
    		historic_event points_25
    	end_if
    	if I_CompareCounter points = 26
    		historic_event points_26
    	end_if
    	if I_CompareCounter points = 27
    		historic_event points_27
    	end_if
    	if I_CompareCounter points = 28
    		historic_event points_28
    	end_if
    	if I_CompareCounter points = 29
    		historic_event points_29
    	end_if
    	if I_CompareCounter points = 30
    		historic_event points_30
    	end_if
    	if I_CompareCounter points = 31
    		historic_event points_31
    	end_if
    	if I_CompareCounter points = 32
    		historic_event points_32
    	end_if
    	if I_CompareCounter points = 33
    		historic_event points_33
    	end_if
    	if I_CompareCounter points = 34
    		historic_event points_34
    	end_if
    	if I_CompareCounter points = 35
    		historic_event points_35
    	end_if
    	if I_CompareCounter points = 36
    		historic_event points_36
    	end_if
    	if I_CompareCounter points = 37
    		historic_event points_37
    	end_if
    	if I_CompareCounter points = 38
    		historic_event points_38
    	end_if
    	if I_CompareCounter points = 39
    		historic_event points_39
    	end_if
    	if I_CompareCounter points = 40
    		historic_event points_40
    	end_if
    	if I_CompareCounter points = 41
    		historic_event points_41
    	end_if
    	if I_CompareCounter points = 42
    		historic_event points_42
    	end_if
    	if I_CompareCounter points = 43
    		historic_event points_43
    	end_if
    	if I_CompareCounter points = 44
    		historic_event points_44
    	end_if
    	if I_CompareCounter points = 45
    		historic_event points_45
    	end_if
    	if I_CompareCounter points = 46
    		historic_event points_46
    	end_if
    	if I_CompareCounter points = 47
    		historic_event points_47
    	end_if
    	if I_CompareCounter points = 48
    		historic_event points_48
    	end_if
    	if I_CompareCounter points = 49
    		historic_event points_49
    	end_if
    	if I_CompareCounter points = 50
    		historic_event points_50
    	end_if
    	if I_CompareCounter points = 51
    		historic_event points_51
    	end_if
    	if I_CompareCounter points = 52
    		historic_event points_52
    	end_if
    	if I_CompareCounter points = 53
    		historic_event points_53
    	end_if
    	if I_CompareCounter points = 54
    		historic_event points_54
    	end_if
    	if I_CompareCounter points = 55
    		historic_event points_55
    	end_if
    	if I_CompareCounter points = 56
    		historic_event points_56
    	end_if
    	if I_CompareCounter points = 57
    		historic_event points_57
    	end_if
    	if I_CompareCounter points = 58
    		historic_event points_58
    	end_if
    	if I_CompareCounter points = 59
    		historic_event points_59
    	end_if
    	if I_CompareCounter points = 60
    		historic_event points_60
    	end_if
    	if I_CompareCounter points = 61
    		historic_event points_61
    	end_if
    	if I_CompareCounter points = 62
    		historic_event points_62
    	end_if
    	if I_CompareCounter points = 63
    		historic_event points_63
    	end_if
    	if I_CompareCounter points = 64
    		historic_event points_64
    	end_if
    	if I_CompareCounter points = 65
    		historic_event points_65
    	end_if
    	if I_CompareCounter points = 66
    		historic_event points_66
    	end_if
    	if I_CompareCounter points = 67
    		historic_event points_67
    	end_if
    	if I_CompareCounter points = 68
    		historic_event points_68
    	end_if
    	if I_CompareCounter points = 69
    		historic_event points_69
    	end_if
    	if I_CompareCounter points = 70
    		historic_event points_70
    	end_if
    	if I_CompareCounter points = 71
    		historic_event points_71
    	end_if
    	if I_CompareCounter points = 72
    		historic_event points_72
    	end_if
    	if I_CompareCounter points = 73
    		historic_event points_73
    	end_if
    	if I_CompareCounter points = 74
    		historic_event points_74
    	end_if
    	if I_CompareCounter points = 75
    		historic_event points_75
    	end_if
    	if I_CompareCounter points = 76
    		historic_event points_76
    	end_if
    	if I_CompareCounter points = 77
    		historic_event points_77
    	end_if
    	if I_CompareCounter points = 78
    		historic_event points_78
    	end_if
    	if I_CompareCounter points = 79
    		historic_event points_79
    	end_if
    	if I_CompareCounter points = 80
    		historic_event points_80
    	end_if
    	if I_CompareCounter points = 81
    		historic_event points_81
    	end_if
    	if I_CompareCounter points = 82
    		historic_event points_82
    	end_if
    	if I_CompareCounter points = 83
    		historic_event points_83
    	end_if
    	if I_CompareCounter points = 84
    		historic_event points_84
    	end_if
    	if I_CompareCounter points = 85
    		historic_event points_85
    	end_if
    	if I_CompareCounter points = 86
    		historic_event points_86
    	end_if
    	if I_CompareCounter points = 87
    		historic_event points_87
    	end_if
    	if I_CompareCounter points = 88
    		historic_event points_88
    	end_if
    	if I_CompareCounter points = 89
    		historic_event points_89
    	end_if
    	if I_CompareCounter points = 90
    		historic_event points_90
    	end_if
    	if I_CompareCounter points = 91
    		historic_event points_91
    	end_if
    	if I_CompareCounter points = 92
    		historic_event points_92
    	end_if
    	if I_CompareCounter points = 93
    		historic_event points_93
    	end_if
    	if I_CompareCounter points = 94
    		historic_event points_94
    	end_if
    	if I_CompareCounter points = 95
    		historic_event points_95
    	end_if
    	if I_CompareCounter points = 96
    		historic_event points_96
    	end_if
    	if I_CompareCounter points = 97
    		historic_event points_97
    	end_if
    	if I_CompareCounter points = 98
    		historic_event points_98
    	end_if
    	if I_CompareCounter points = 99
    		historic_event points_99
    	end_if
    	if I_CompareCounter points > 100
    		historic_event points_100
    	end_if
    end_monitor
    An event will pop up when you click the faction statistics button. So then you just make 100 events, points_0 - points_100, in historic_events.txt.

  3. #3

    Default Re: show counter value

    thanks!! this helps a lot, whit aproximations like +10(between 10 and 20), etc.. I think will reduce the amount of events.

    edit: but it will not work for show the amount of points of other factions, edit2: okey i think i have and idea to do that.
    Last edited by wolf-yop; November 23, 2010 at 07:03 PM.

  4. #4
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: show counter value

    Ok Taji, you missed me there: you declare a counter, you click on the faction standing button and you test the counter.
    Where does the counter get it's value from? From the events the OP mentioned?

    Wouldn't you have to write one monitor for each faction? And do the same for the event monitors that give the counter points? Gruesome, awesome.










  5. #5
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: show counter value

    Quote Originally Posted by Gigantus View Post
    Ok Taji, you missed me there: you declare a counter, you click on the faction standing button and you test the counter.
    Where does the counter get it's value from? From the events the OP mentioned?
    Ok, I basically answered this:

    Quote Originally Posted by wolf-yop View Post
    What I dont know how to do is show the value of the counter to the player
    The rest of the question is complex and involves a lot of decision making for Wolf-Yop.

    An event popup per faction is not practical unless we're making a mod deliberately to annoy people, for example.

    So I just gave him the info needed to get to the point where he's going to realise, if he hasn't already, the decisions he's going to have to make to get further.

    Perhaps tracking the other factions points and finding some satisfying way to use them to offset the player's points, for example. He's going to have to mould his idea to the shape of the system somehow.

    Quote Originally Posted by Gigantus View Post
    Wouldn't you have to write one monitor for each faction? And do the same for the event monitors that give the counter points? Gruesome, awesome.
    Yep. Not hard to do but then I'd be thinking that it wouldn't be necessary. Personally I'd give the player a detailed system and then lump something more abstract on the AI, since it won't appreciate the detail because it doesn't appreciate.... lol
    Last edited by Taiji; November 24, 2010 at 09:52 AM.

  6. #6
    Gigantus's Avatar I am not special - I am a limited edition.
    Moderator Emeritus Administrator Emeritus

    Join Date
    Aug 2006
    Location
    Goa - India
    Posts
    52,682
    Blog Entries
    35

    Default Re: show counter value

    Thanks for confirming my thoughts. And a silent thanks to the script replicator.










  7. #7

    Default Re: show counter value

    well instead of show the points when a player press a certain button, I think of show points in certain turns to every faction(hotseat) whit a event per faction which have the amount of points. A inc_counter can count the number of turns passed then launch the script and reset the counter the condition need.

    spawn 20 events is annoying but this every 50 turns dont hurt.

  8. #8
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: show counter value

    I recommend being careful not to fire any events during the AI's turn. I seem to remember it causes a bit of performance loss, but it can also causes Vista to CTD the game apparently. So make sure you have some check to make certain it's a 'local faction' before firing an event.

    What I thought would be annoying would be to have an event pop up to tell a player what other factions points are. As many events as factions would mean the player clicking 'accept' over and over. Checking other faction's points would become a tiresome chore.

    I mentioned it because you wrote this:

    Quote Originally Posted by wolf-yop View Post
    What I dont know how to do is show the value of the counter to the player like making a event which show every faction points.
    That isn't possible and the closest thing to it, multiple events, is undesirable. But if you only mean to show the player a single event which shows only his own faction's points then that's something else. No problem to that except ensuring that redundant events, meant only for players, aren't being fired for the AI too.

    Gigantus, you're welcome. It's a pleasure
    Last edited by Taiji; November 24, 2010 at 04:38 PM.

  9. #9

    Default Re: show counter value

    thanks for the advise.

  10. #10
    /|\/|\/|\/|\/|\/|\/
    Join Date
    Jun 2005
    Posts
    10,770

    Default Re: show counter value

    Welcome, and good luck, Wolf-Yop! Sounds like an interesting script

    Oh... quick extra note: The AI does not click on buttons, or anything else. So an event launched at a button press cannot be fired by the AI anyway.

    I got carried away thinking about what might be a problem... But I don't think it will be a problem in this case. Sorry for any confusion
    Last edited by Taiji; November 24, 2010 at 05:19 PM.

Posting Permissions

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