You must be logged in to post messages.
Please login or register

Scenario Design
Moderated by Yeebaagooon, TAG

Hop to:    
Welcome! You are not logged in. Please Login or Register.1672 replies, Sticky
Age of Mythology Heaven » Forums » Scenario Design » Have a Trigger Request? Post it here!
Bottom
Topic Subject:Have a Trigger Request? Post it here!
« Previous Page  1 2 3 4 ··· 10 ··· 20 ··· 30 ··· 40 ··· 50 ··· 60 ··· 67  Next Page »
Elrich
Hero
posted 23 July 2010 11:41 AM EDT (US)         
So you have a question trigger request?

You can post it here!



Hello and welcome to the Trigger Request Thread (TRT). This thread's purpose is only to place trigger requests and discuss them. If you have unrelated questions or need help with triggers, please use Azur's thread!



Before posting your request, it's always good to read the so-called FAQ.

  1. What is a FAQ?
    The term "FAQ" (when pronounced, it rhymes with "back") is an acronym for Frequently Asked Questions.

  2. How do I install a trigger?
    When we have finished making your trigger, we'll post the required code here. To install this code you will first of all need to find your way to the AoM installation folder. C:\Program Files\Microsoft Games\Age of Mythology by default). Now open the trigger folder if you intend to use the trigger in vanilla, or open the trigger2 folder if you use The Titans expansion. Next, open the file called typetest.xml. The only thing left to do is copy the code at the right position and save. If you requested a condition, then place the line above < /Conditions>, if you requested an effect paste it right above < /Effects>. Note the "s" at the end of both tags.

    Notes:

    1. When copying the trigger from someone please click first and only then copy the required code.
    2. If you're still uncomfortable with installing triggers please backup the original typetest file, i.e. copy the original to another folder.


  3. How do I uninstall a trigger?
    If a trigger happens to be faulty or if it generates errors you better remove it. Just do as if you were installing a new trigger, but instead of copy-pasting new code, remove the code corresponding with the chosen trigger. Make sure to remove it completely, including the starting < effect > or < condition > tag and the corresponding < /effect > or < /condition > closing tag. Failure to do so properly will cause XML errors in the file making ALL triggers in that file inaccessbile for AoM.

  4. So... How exactly are new triggers made?
    AoM has a built-in engine that can parse XS code. Triggers are programmed and interpreted using this language through a series of existing functions. Since there are over 600 functions, and only a few are used by the default triggers, this leaves plenty of room for a whole new set of advanced, useful triggers.

  5. Can I request anything?
    Although we can do a lot with today's knowledge, there are still limitation we won't ever get around. So if you think of a cool new trigger, make sure to post a request but don't forget you might get a negative reply. Commonly requested triggers that are not possible include (but are not limited to):

    • Modify Unit: change the stats of 1 particular unit.
    • Change Playername
    • Change Major God
    • Transform ALL units on map for player
    • I'll add more when I think of them.


  6. I want to learn trigger scripting, how do I do that?
    It takes quite some time, but if you really want to learn trigger coding, we recommend fully understanding XS language before you start making triggers. Therefore, go here: Master XS (WIP). If you want to skip all that, and you want to be able to create only simple triggers, read this guide.

  7. Help! My triggers have stopped working!
    Triggers Stop Working Guide. Also linking camera tracks, using Run Immediately, sound timers and decimals in conditions like Timer and Distance to Unit effect, might cause this. Moreover, typing an invalid name on the Victory Conditions will cause a trigger block. But post these sort of questions in the Great Question thread.



Resources

Recommended Downloads:
  1. Trigger Loader 2 + Quest Vars (AoM && TT) by invent00r and Mythic_Freak
  2. SomeNewXTriggers 3 (TT) & SomeNewTriggers 4 (AoM) by Reyk
  3. Proactive Triggers (TT & AoM) by invent00r
  4. Advanced Triggers Set (TT) by pftq
  5. New Custom Triggers (TT) by Baseballkid14
  6. Nottud's Latest Triggers by nottud
  7. Conditonal Effects (TT & AoM) by nottud
  8. Angry Levels (TT & AoM) by angryzor
  9. SIMSTools (TT) by angryzor
  10. Target Protounit Query by HailToTheOboe

Miscellaneous:
  1. First TRT by invent00r
  2. Trigger Templates by Mephiles
  3. A list of all guides sorted by Paperfriend




Posting a Request

So you have read the FAQ and want to post a request? OK, go for it, just be sure to use the following format:

Name - This should be as straightforward as possible. Try to comply with today's standards.
Description - Always describe the actions that you want the trigger to perform.
Example - Optional. An example can be a great help when requesting complex triggers.


[b]Name[/b] -
[b]Description[/b] -
[b]Example[/b] -


We might even ignore posts in other formats if we're in a bad mood
Remember that not all triggers are possible but we will try our best.




Unfinished Requests

  • Unit Patrol by Bingo Little
  • Army Wander by Endarron
  • QV Damage Units in QV area by name by mrjonathan0
  • Unit Heading Towards Unit by dwieeb
  • Damage units in Area by % (has been done before?) by Steak And Khan
  • Most Units In Area by Sir_Hans
  • QV Modify x by satansfall
  • Move from area to random area by Mister SCP
  • Set Unit Formation by aZeusDude2
  • Army Deploy Random Myth Unit by bgan
  • QV Randomize Series by Alexgd92
  • Convert all except protounit (or unit) by Joshonator
  • SET Ambient Colour/Sun Colour/Sun Specular/Terrain Ambient Fade Version by andrewv42
  • Damage units near army by AJER
  • QV count units in area with state by AuroraP
  • QV Grant random resources per stat by AuroraP
  • Condition: Random Timer by SwordOfValor
  • Army deploy in line by SwordOfValor
  • Condition: unit (type/in area) worked on other unit. by WinstonShnozwick
  • Gruoup selected by Guard of Olympus
  • Pick Unit by XxXItachiXxX
  • Modify Protounit All Percent by AuroraP
  • Random Forest by Bubble

  • Finished Requests

  • Damage Units near protounit for sneaky_squirrel & mrjonathan0
  • Move units from area to unit for Azur
  • Clear Chat History of Player & Chat Contains Anything for Lewonas
  • QV Change unit type by ID for Yeebaagooon
  • Move to QV Unit for Yeebaagoon
  • QV Modify Protounit for Xzyiothe
  • Player Kill GP Slot for Titanic Kraken
  • Move all player units for Anstar
  • Protounit Change Name for Dimir_Guildmage
  • Shop start/end with max for Mephiles
  • Diplomacy trigger for Yeebaagooon
  • Diplomacy both ways trigger for Yeebaagooon
  • Modify protounit trigger for Yeebaagooon
  • Convert trigger for Yeebaagooon
  • Make all units have no bonuses for Brighty
  • Conditional Army Units in Area for Sneaky_Squirrel
  • GROUP Select 2 for AuroraP
  • Send QV Color Chat for Alexgd92
  • Quest Var xModify for Alexgd92
  • QV Randomize 4 amounts for Alexgd92
  • QV Set Population Count for Beelzebub
  • Units in area of army for SwordOfValor
  • Damage units in area of army for SwordOfValor
  • AG with armies for SwordOfValor
  • Army deploy QV Count for Silicone Ruff Jr
  • Quest Var set rank for gunner1
  • Convert units in area to random player for Zorx
  • Units Change Name By Type for beerad
  • Army deploy where the units facing for SwordOfValor
  • Unit Heading Towards Unit for Noble
  • Convert Random Units In Selection for xEXOLARx
  • QV Set Units in Area (Center Army) for SwordOfValor
  • Move Units from Area (action) for SwordOfValor

  • Enjoy.
    Last updated: 03 september 2009

    In all your science of the mind, seeking blind through flesh and bone
    Find the blood inside this stone
    Well, I know I've never shown what I feel, I've always known
    I plan my vengeance on my own - and I was always alone
    AuthorReplies:
    Elrich
    Hero
    posted 28 July 2010 10:05 AM EDT (US)     26 / 1672       
    @TRT minions: I still intend to update this thread. I just haven't had any personal time to do it so far. I intend to do a rough pass on the old thread to update effects/conditions posted and requests made/fulfilled then reorganize the Main Post.

    I also sparked an idea to make a master database of every condition/effect ever created into a searchable database which will hopefully help people find what they need before they ask for an already existing effect/condition to be created.
    *heaps project onto giant stack already on plate*


    In all your science of the mind, seeking blind through flesh and bone
    Find the blood inside this stone
    Well, I know I've never shown what I feel, I've always known
    I plan my vengeance on my own - and I was always alone
    TAG
    That AoM Guy
    (id: aom expert)
    posted 28 July 2010 02:56 PM EDT (US)     27 / 1672       
    Props for determination

    Check out my YouTube
    For live help with me, enter this chatroom. If I'm not on you can leave a message.
    Ranfeld
    Mortal
    posted 28 July 2010 05:26 PM EDT (US)     28 / 1672       
    Possible?
    Name:Load Texture
    EffectAllows you to have multiple textures for a unit, and load them from a file.
    WinstonShnozwick
    Mortal
    posted 28 July 2010 10:08 PM EDT (US)     29 / 1672       
    @Ranfeld- Sorry man, I asked about that one a while ago, but it can't be done. Would be amazing though.

    Tired of unorigional, boring campaigns? Try out DEMO|Legacy - The Uprising|DEMO
    Completely New Gameplay. Random Map Type Replayability. Delve into Nomadican|FEATURES|DOWNLOAD|
    Want to know how to use triggers and/or create amazing factors in your scenarios? You need Combination Effects|FEATURES|DOWNLOAD|
    Automaton Metals Textures, New Custom Triggers
    Upcoming Projects: Legacy - The Uprising, Destiny
    6/12/1997, a day that will live in infamy.
    HailToTheOboe
    Bitten by a radioactive ostrich
    posted 28 July 2010 10:47 PM EDT (US)     30 / 1672       
    Winston, I'm pretty sure the one you've got is the right one. From the default camera angle, you should choose left-right corners, not top-bottom. Left for corner1, right for corner 2.
    Ranfeld
    Mortal
    posted 30 July 2010 09:34 PM EDT (US)     31 / 1672       
    I have several trigger requests.
    Unit attack selected Unit
    Create Unit at selected Unit
    Damage Selected Unit
    perpetual_n00b
    Immortal
    posted 31 July 2010 07:00 AM EDT (US)     32 / 1672       
    @ Ranfeld

    By 'selected unit' do you mean selected in-game or selected by trigger?

    If selected by trigger then these are the ones you want:
    Unit attack selected Unit -> Unit Work
    Create Unit at selected Unit -> Unit Create at Unit (from nottuds typetest3.xml)
    Damage Selected Unit -> Damage Unit or Damage Unit Percent

    If selected in-game then you might be able to use HTTO's v triggers with v Condition Unit Selected and v versions of the effects listed above.
    For example:
    v TPQ Start
    v Condition Unit Selected
    v Damage Unit
    v Condition End
    v TPQ End
    BSU_DoLhades
    Mortal
    posted 31 July 2010 02:30 PM EDT (US)     33 / 1672       
    is it possible to put a trigger to increase a units strength while surrounded by allies? like the fenris wolf brood does?

    Leader and Trigger Artist of Mythic Studios
    I need players for my Peloponnesian War RPG (Its Semi-Historical)
    Now quit being a bitch and quote me in your signature like Yeebaagooon used to. ~Out Reach
    Ranfeld
    Mortal
    posted 31 July 2010 08:23 PM EDT (US)     34 / 1672       
    Thanks
    For some reason I never noticed the vCondition triggers... they open up a whole new field of opportunity.
    EDIT:
    Also if possible...
    Name:Damage Units Unit Heading

    Explanation: Damages units that are relative to a unit.

    [This message has been edited by Ranfeld (edited 08-01-2010 @ 09:20 PM).]

    BSU_DoLhades
    Mortal
    posted 02 August 2010 12:19 PM EDT (US)     35 / 1672       
    i think you can do that in unit distance to unit (Nottud superpack) -> damage unit %

    Leader and Trigger Artist of Mythic Studios
    I need players for my Peloponnesian War RPG (Its Semi-Historical)
    Now quit being a bitch and quote me in your signature like Yeebaagooon used to. ~Out Reach

    [This message has been edited by BSU_DoLhades (edited 08-02-2010 @ 12:19 PM).]

    Ranfeld
    Mortal
    posted 02 August 2010 03:57 PM EDT (US)     36 / 1672       
    I don't think I explained my question very well...Prehaps a picture will help.

    As you can see only the units in the way of the line of damage are damaged, and the line is dependent on three parameters.
  • Center unit
  • Heading in comparsion of center unit.
  • Distance from center unit
    If someone could turn this into a condition it would be extremely helpful.

    [This message has been edited by Ranfeld (edited 08-02-2010 @ 03:57 PM).]

  • WinstonShnozwick
    Mortal
    posted 03 August 2010 10:55 PM EDT (US)     37 / 1672       
    Hail, as always you were right, I tested though in a new blank map, and found that there was an annoying trick happening. It works fine.

    But theres this wierd thing that if you have a trigger that doesnt work and you get a fixed one, it wont ever work in the same trigger as the broken one even if you redo it. SO I just have to make a new trigger, cant use the same one. Strange, do you know anything about this, its annoying.

    Question:

    Im trying to make this trigger for creating a lighitng file.
    <Effect name="Create Custom Lighting">
    <Param name="Filename" dispName="Lighting Title" varType="string">Void</Param>
    <Param name="Specular" dispName="Water Specular" varType="float">0,0,0</Param>
    <Param name="Sun" dispName="Sun Color" varType="float">0,0,0</Param>
    <Param name="Terrain" dispName="Terrain Ambient" varType="float">0,0,0</Param>
    <Param name="Ambient" dispName="Ambient Color" varType="float">0,0,0</Param>
    <Param name="InclinationRotation" dispName="Incline/Rotate" varType="string">The sun's inclination and rotation will be whatever they were when this effect activates.</Param>
    <Param name="HELP" dispName="Value CopyPaste" varType="string">trQuestVarGet("NAMEHERE")</Param>
    <Command>fakeSpecularSunColor(%Specular%);</Command>
    <Command>sunColor(%Sun%);</Command>
    <Command>terrainAmbient(%Terrain%);</Command>
    <Command>ambientColor(%Ambient%);</Command>
    <Command>saveLightingSet("%Filename%");</Command>
    </Effect>
    It works, but I have to look in the directory of aom for the lighting and open it before it appears in the editor. So it doesnt work in the aspect of being able to use it the game you make it in. So Im wondering, with this bit of code from nottuds;
      <Command>subModeEnter("Simulation", "Editor");</Command> 
    <Command>uiMessageBox("moo","setSunPosition(%inclination%,%rotation%,false)");</Command>
    <Command>uiCycleCurrentActivate();</Command>
    <Command>subModeLeave("Simulation", "Editor");</Command>
    <Command>modeEnter("pregame");</Command>
    <Command>modeEnter("Simulation");</Command>
    <Command>subModeEnter("Simulation", "Singleplayer");</Command>
    Do you need to put the savelighting set command in there to make it fully work? as in it being a z command would it be? assist please

    Tired of unorigional, boring campaigns? Try out DEMO|Legacy - The Uprising|DEMO
    Completely New Gameplay. Random Map Type Replayability. Delve into Nomadican|FEATURES|DOWNLOAD|
    Want to know how to use triggers and/or create amazing factors in your scenarios? You need Combination Effects|FEATURES|DOWNLOAD|
    Automaton Metals Textures, New Custom Triggers
    Upcoming Projects: Legacy - The Uprising, Destiny
    6/12/1997, a day that will live in infamy.

    [This message has been edited by WinstonShnozwick (edited 08-04-2010 @ 02:37 AM).]

    Elrich
    Hero
    posted 04 August 2010 11:07 AM EDT (US)     38 / 1672       
    @Ranfield: would you need that condition for many units or just one (like a unique boss)? I can imagine a condition that first gets a list of units within your damage distance of a cener unit (a kbsearch query), then going through that list checking angles based on the center unit's heading, but it would require trigonometry which means using the Trigger Loader. I wrote an effect that loops and tracks a unit's heading (because of limitations of the getunitheading command) so that part is done, but if this is done on a loop for many units, I am guessing it would be laggy.

    @Winston:
    First:
    But theres this wierd thing that if you have a trigger that doesnt work and you get a fixed one, it wont ever work in the same trigger as the broken one even if you redo it. SO I just have to make a new trigger, cant use the same one. Strange, do you know anything about this, its annoying.
    Not that I have found. When developing an EFFECT or a Condition, that is part of a trigger, I found that I can close out of AOM, edit the trigger XML file, reload AOM, open the scenario, delete just the bad Effect/Condition and reinsert the fixed Effect/Condition into the same trigger without a problem. Remember that once you create a trigger in the scenario from conditions and effects, that it makes a copy of those conditions/effects' code AT THE TIME THEY WERE ADDED TO THE TRIGGER. If you edit a condition/effect in a trigger file and reload AOM, you have to replace all old copies of that condition/effect that were used in any triggers. It is done this way so that you can give a scenario to someone and they're not required to have everything you have in your trigger file.

    Second:
    What are you trying to accomplish? Do you want to create a lighting set in-game dynamically and recall it later in-game? If the lightings can be created beforehand, you can use nottud's zset advanced lighting (sp?) to create in-editor many prearranged lightings. For each lighting, put it in its own trigger with a condition of Always but NOT enabled and Not looped. Then when you want to activate one of these lightings just fire event the lighting trigger you want to activate at the time. You can make as many as you want and you don't need to give or create a lighting file with your scenario.


    In all your science of the mind, seeking blind through flesh and bone
    Find the blood inside this stone
    Well, I know I've never shown what I feel, I've always known
    I plan my vengeance on my own - and I was always alone
    WinstonShnozwick
    Mortal
    posted 04 August 2010 11:17 AM EDT (US)     39 / 1672       
    Its for not having to provide lighting files with the game, so you can use set lighting to fade in and out CUSTOM lightings, which normally you cannot do if there isnt a file made for them.

    And its wierd, I can't get the units in UDA to work in my map. It works in a test on a blank map, but not on mine no matter what I do, please help?

    Tired of unorigional, boring campaigns? Try out DEMO|Legacy - The Uprising|DEMO
    Completely New Gameplay. Random Map Type Replayability. Delve into Nomadican|FEATURES|DOWNLOAD|
    Want to know how to use triggers and/or create amazing factors in your scenarios? You need Combination Effects|FEATURES|DOWNLOAD|
    Automaton Metals Textures, New Custom Triggers
    Upcoming Projects: Legacy - The Uprising, Destiny
    6/12/1997, a day that will live in infamy.
    Ranfeld
    Mortal
    posted 04 August 2010 11:25 AM EDT (US)     40 / 1672       
    @Elrich

    Thanks~I think I understand your Idea but...not quite.
    I can imagine a condition that first gets a list of units within your damage distance of a cener unit (a kbsearch query
    So it first finds all the units in a radius around the unit..
    then going through that list checking angles based on the center unit's heading
    Then it goes through a search looking for units that allign with the center units angle?

    NOTE: In case I didn't make this clear this is for a single unit.

    [This message has been edited by Ranfeld (edited 08-04-2010 @ 11:26 AM).]

    Elrich
    Hero
    posted 04 August 2010 01:44 PM EDT (US)     41 / 1672       
    @Winston: then all you need is nottud's Effect:

    <Effect name="zset advanced lighting">
    <Param name="water" dispName="water color RGB" varType="stringid">0,0,0</Param>
    <Param name="sun" dispName="sun color RGB" varType="stringid">0,0,0</Param>
    <Param name="ambient" dispName="ambient color RGB" varType="stringid">0,0,0</Param>
    <Param name="terrain" dispName="terrain reflect color RGB" varType="stringid">0,0,0</Param>
    <Param name="inclination" dispName="sun inclination" varType="long">0</Param>
    <Param name="rotation" dispName="sun rotation" varType="long">0</Param>
    <Command>fakeSpecularSunColor(%water%);</Command>
    <Command>sunColor(%sun%);</Command>
    <Command>ambientColor(%ambient%);</Command>
    <Command>terrainAmbient(%terrain%);</Command>
    <Command>subModeEnter("Simulation", "Editor");</Command>
    <Command>uiMessageBox("moo","setSunPosition(%inclination%,%rotation%,false)");</Command>
    <Command>uiCycleCurrentActivate();</Command>
    <Command>subModeLeave("Simulation", "Editor");</Command>
    <Command>modeEnter("pregame");</Command>
    <Command>modeEnter("Simulation");</Command>
    <Command>subModeEnter("Simulation", "Singleplayer");</Command>
    </Effect>
    (which you probably already have) It sets everything about the lighting that the file does via the parameters. In case you don't know how to get these settings, use the lighting tool to get the lighting you want and click SAVE. It will create a file called ~None.lgt in your aom/DATA directory. Open that with notepad and you will see the red,green,blue of each of the four colors and the inclination and rotation that you will need to plug into Nottud's effect.

    @Ranfield: oh sorry, that's sort of 'thinking out loud' not actual instructions. Your request will require custom programming to accomplish (if it's possible). I am very short of time these days, but maybe a passing by coder might take my thoughts and make it for you.


    In all your science of the mind, seeking blind through flesh and bone
    Find the blood inside this stone
    Well, I know I've never shown what I feel, I've always known
    I plan my vengeance on my own - and I was always alone
    WinstonShnozwick
    Mortal
    posted 04 August 2010 02:54 PM EDT (US)     42 / 1672       
    Im not a simpleton I know the lighting.

    I mean, using the set lighting effect, you cant set a lighting named Void that has black for all of the lighting sets normally. With the custojm ligjting trigger effect yeah. I mean though I want to create a saved lgt file of it so I can FADE IN AND OUT the lighting, not just turn it on.

    Tired of unorigional, boring campaigns? Try out DEMO|Legacy - The Uprising|DEMO
    Completely New Gameplay. Random Map Type Replayability. Delve into Nomadican|FEATURES|DOWNLOAD|
    Want to know how to use triggers and/or create amazing factors in your scenarios? You need Combination Effects|FEATURES|DOWNLOAD|
    Automaton Metals Textures, New Custom Triggers
    Upcoming Projects: Legacy - The Uprising, Destiny
    6/12/1997, a day that will live in infamy.
    perpetual_n00b
    Immortal
    posted 04 August 2010 03:13 PM EDT (US)     43 / 1672       
    @ Ranfeld

    Someone might come up with a more elegant solution, but you could use Army Deploy in front of unit to deploy an invisible unit as an army where the unit is facing at a distance of 5 and then do Damage Units in Area of Army using the army you just deployed and with a radius of 5. You would have then damaged units in a circle in the direction the unit is facing.



    Here are the effects if you don't have them:


    <Effect name = "Army Deploy in front of unit">
    <Param name="SrcArmy" dispName="Army" varType="group">default</Param>
    <Param name="ProtoName" dispName="Protounit" varType="protounit">Villager</Param>
    <Param name="Count" dispName="Count" varType="string">1</Param>
    <Param name="Object" dispName="Target Unit" varType="unit">default</Param>
    <Param name="Distance" dispName="Distance" varType="string">1</Param>
    <Param name="Heading" dispName="Heading QV" varType="string">QV1</Param>
    <Command>trVectorQuestVarSet("unitposasdf", kbGetBlockPosition("%Object%"));</Command>
    <Command>trVectorQuestVarSet("unitnewasdf", xsVectorSet(1.0*%Distance%*Math_sin(PI/180.0*trQuestVarGet("%Heading%")),0,1.0*%Distance%*Math_cos(PI/180.0*trQuestVarGet("%Heading%")))); </Command>
    <Command>trVectorQuestVarSet("unitnewasdf", trVectorQuestVarGet("unitnewasdf") + trVectorQuestVarGet("unitposasdf"));</Command>
    <Command>trArmyDispatch("%SrcArmy%", "%ProtoName%", %Count%,trVectorQuestVarGetX("unitnewasdf"),trVectorQuestVarGetY("unitnewasdf"),trVectorQuestVarGetZ("unitnewasdf"), 0, true);</Command>
    </Effect>

    <Effect name="Damage Units in Area of Army">
    <Param name="SrcObject" dispName="Center Army" VarType="group">0,0</Param>
    <Param name="Player" dispName="$$22301$$Player" VarType="player">0</Param>
    <Param name="UnitType" dispName="$$22302$$Unit Type" VarType="string">Unit</Param>
    <Param name="Dist" dispName="$$22303$$Radius" VarType="float">10</Param>
    <Param name="Hurt" dispName="Damage" VarType="long">50</Param>
    <Command>trArmySelect("%SrcObject%");</Command>
    <Command>trDamageUnitsInArea(%Player%,"%UnitType%",%Dist%,%Hurt%);</Command>
    </Effect>
    Edit: Damn forum corrupted the effect. Fixed

    @ Anyone who might have time to test
    Winston's question about lighting and saveLightingSet got me thinking.

    Would it be possible to set a lighting and save it in one scenario, then apply those settings and read the values in another?

    If so, then you could possibly have a persistent hero throughout a campaign by setting the lighting at the end of one scenario based on unit stats, then you would apply that lighting in the next scenario, read the stats and apply them to a unit.

    For example:
    Scenario 1 - Save Data
    ambientColor(unit, level, hp)
    sunColor(food, wood, gold)
    fakeSpecularSunColor(favor, XP, armour)
    terrainAmbient(attack, attack, attack)
    saveLightingSet(HeroData)

    Scenario 2 - Read Data
    applyLightingSet(HeroData)
    ambientGetColor
    sunGetColor
    fakeSpecularSunGetColor
    terrainGetAmbient

    [This message has been edited by perpetual_n00b (edited 08-04-2010 @ 03:44 PM).]

    WinstonShnozwick
    Mortal
    posted 04 August 2010 03:19 PM EDT (US)     44 / 1672       
    Perpetual, my save lighting effect works, when I use it I go to the aom directory data folder, and its there. You could do exactly what you are speaking of, all the conditions and effects to deal with the lightings are there, its totally possible. This is amazing. Trigger setups can be made with this.

    The only flaw is like I said, it works, but the lgt file doesnt show up ingame unless/until you go open it in the data folder, I dunno why. Ill test my hunch to see if I can get it working perfectly. Then we can talk about that idea you have.

    edit: How to read the RGB numbers separated by commas is the tricky part though. Im thinking that QV String Trigger loader thing right?

    Tired of unorigional, boring campaigns? Try out DEMO|Legacy - The Uprising|DEMO
    Completely New Gameplay. Random Map Type Replayability. Delve into Nomadican|FEATURES|DOWNLOAD|
    Want to know how to use triggers and/or create amazing factors in your scenarios? You need Combination Effects|FEATURES|DOWNLOAD|
    Automaton Metals Textures, New Custom Triggers
    Upcoming Projects: Legacy - The Uprising, Destiny
    6/12/1997, a day that will live in infamy.

    [This message has been edited by WinstonShnozwick (edited 08-04-2010 @ 03:30 PM).]

    perpetual_n00b
    Immortal
    posted 04 August 2010 04:00 PM EDT (US)     45 / 1672       
    I was thinking of using either a QV Vector or 3 normal QVs per colour
    For example:
    trQuestVarSet("HeroData1",xsVectorGetX(ambientGetColor())
    trQuestVarSet("HeroData2",xsVectorGetY(ambientGetColor())
    trQuestVarSet("HeroData3",xsVectorGetZ(ambientGetColor())

    [This message has been edited by perpetual_n00b (edited 08-04-2010 @ 04:00 PM).]

    WinstonShnozwick
    Mortal
    posted 04 August 2010 04:04 PM EDT (US)     46 / 1672       
    Great! Vectors store three numbers in xyz like lighting has three numbers in RGB, that should do it!

    Oh man, cheaters would take advantage of this, if stats were dependant on a lighting file, they could make their own lgt and change it to get maximum benefit

    Tired of unorigional, boring campaigns? Try out DEMO|Legacy - The Uprising|DEMO
    Completely New Gameplay. Random Map Type Replayability. Delve into Nomadican|FEATURES|DOWNLOAD|
    Want to know how to use triggers and/or create amazing factors in your scenarios? You need Combination Effects|FEATURES|DOWNLOAD|
    Automaton Metals Textures, New Custom Triggers
    Upcoming Projects: Legacy - The Uprising, Destiny
    6/12/1997, a day that will live in infamy.

    [This message has been edited by WinstonShnozwick (edited 08-04-2010 @ 04:05 PM).]

    Elrich
    Hero
    posted 04 August 2010 04:21 PM EDT (US)     47 / 1672       
    @perp: that's a good idea. First of all, I didn't know you could read the current color settings. Can you also get the inclination and rotation?

    Winston's right, they could edit their stats in the savegame/.lgt file, but you could create a checksum for the values just like the 16th number of a credit card is actually a number based on a predetermined formula using the other 15 digits. Even though they could look through the trigtemp.xs file for the checksum algorithm, you could put in useless math and confusing var names to make it basically not worth cheating. I have deciphered emailed script viruses that used crazy var names to obscure its purpose. It's a pretty effective scheme.


    In all your science of the mind, seeking blind through flesh and bone
    Find the blood inside this stone
    Well, I know I've never shown what I feel, I've always known
    I plan my vengeance on my own - and I was always alone
    perpetual_n00b
    Immortal
    posted 04 August 2010 04:21 PM EDT (US)     48 / 1672       
    You just have to make it hard for cheaters to figure it out.

    Each of the three numbers can be 0 to 255, right?

    Use a bit of binary
    00000000 = 0
    11111111 = 255

    That means each number is basically 8 true/false switches , each colour is 24 switches and there are 4 colours so we've 96 switches in all (good for checking if a character has an item or has completed a quest).

    You just make one of those switches turn the character into a pig or end the game.

    So, if the cheater just puts 255,255,255 for the colours then they stuff themselves up.
    WinstonShnozwick
    Mortal
    posted 04 August 2010 04:25 PM EDT (US)     49 / 1672       
    Or my way, which is you make certain stats mean something by themselves not releated to their face number value. Like 255 == 16 attack, summit like that. Elrich, explain more on yours? I kinda get it, I just dont know what your talking about with the checksum.

    And yes elrich, its easy to get the lighting numbers, even sun rotation/inclination, just make a qv that takes the numbers from them ,like perps previous post. I've done stuff liek this, shoudnt be difficult at all.

    Tired of unorigional, boring campaigns? Try out DEMO|Legacy - The Uprising|DEMO
    Completely New Gameplay. Random Map Type Replayability. Delve into Nomadican|FEATURES|DOWNLOAD|
    Want to know how to use triggers and/or create amazing factors in your scenarios? You need Combination Effects|FEATURES|DOWNLOAD|
    Automaton Metals Textures, New Custom Triggers
    Upcoming Projects: Legacy - The Uprising, Destiny
    6/12/1997, a day that will live in infamy.
    Elrich
    Hero
    posted 04 August 2010 04:39 PM EDT (US)     50 / 1672       
    @Winston: here is an example of a checksum algorithm:
    let's make up an id number of '283483'. The first five digits are the actual account number the last digit (3) is a checksum. The formula is digit1 X 3 + digit2 X 7 + digit3 X 1 + digit4 X 3 + digit5 X 7 = checkdigit total. Checksum = 1's column of the checkdigit total, so:

    2 X 3 = 6
    8 X 7 = 56
    3 X 1 = 3
    4 X 3 = 12
    8 X 7 = 56

    checkdigits added together = 133
    checksum = '3'
    final id number = '283483'

    It's not that complicated and is more to save from typos rather than hiding an account number, but the concept can be useful.

    As for the lightings, since you've done it before, what are all of the XS commands that return the current lighting settings?

    ambientGetColor() = ambient color obviously
    the rest...?

    and I believe Lostro created a manual fade to color effect.


    In all your science of the mind, seeking blind through flesh and bone
    Find the blood inside this stone
    Well, I know I've never shown what I feel, I've always known
    I plan my vengeance on my own - and I was always alone
    « Previous Page  1 2 3 4 ··· 10 ··· 20 ··· 30 ··· 40 ··· 50 ··· 60 ··· 67  Next Page »
    You must be logged in to post messages.
    Please login or register

    Hop to:    

    Age of Mythology Heaven | HeavenGames