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

Scenario Design
Moderated by MosheLevi, Mister SCP

Hop to:    
loginhomeregisterhelprules
Bottom
Topic Subject: The RMS question Thread
« Previous Page  1 ··· 10 ··· 20 ··· 24 25 26 27 28  Next Page »
posted 04-27-06 06:09 AM EDT (US)   
This thread is intended for discussion of questions regarding Random Map Scripting for AOE3. Instead of posting questions separately in the forum, use this thread which will serve as a collection of (?)wisdom for those looking for information. I will be checking this thread at least several times per week, and I hope that the other experienced scripters will join in to add their wisdom.

For those seeking some basic starting help, try these links to some helpful information:
The Age of Wiki has a useful section on Random Map Scripting.

An AOE3RMS Tutorial by MOnTy PyThOn is a pretty complete guide to help you understand the various commands.

Finally, try downloading some of the map scripts at the Age of Empires IIIHeaven RMS Download section and open the map scripts in a text editor and check them out to see how it is done. You could also open the map scripts that came with the game to study their commands; these will be found in the directory: Program Files\Microsoft Games\Age of Empires III\rm.

So post any RMS questions here, we will try to help!

Replies:
posted 08-21-13 08:40 PM EDT (US)     626 / 736  
Just about to release version 2 for vanilla (almost double the file size :P), and then I'll take a break before starting the conversion to TAD.

Before I do, I'd like to check: Is there a way to detect which shipments are currently being sent, and the percentage they are at?

At the moment I can only do this for technologies - For shipments it only seems to detect it once they have finished sending.


EDIT: Never mind, I'll just upload it without this feature- it probably isn't possible anyway. Just going to finish the readme.

Should be available soon at

http://aoe3.heavengames.com/downloads/showfile.php?fileid=3523

[This message has been edited by Aizamk (edited 08-22-2013 @ 11:09 AM).]

posted 08-22-13 03:32 PM EDT (US)     627 / 736  
I think you could try toggling the player queue gadget, but I'm not sure you can make it visible from Player 1 and 2 to the rest, but not to their opponents.

That's the closest you could get to seeing shipments in the process of being shipped, whether or not they eventually get shipped.


Hm, well, if you toggle the player queue gadget there is no communication between your toggled gadget and another player's context.

If you could get the player's context and have it shown in the player queue gadget, that would be it.

[This message has been edited by Neuron (edited 08-22-2013 @ 03:43 PM).]

posted 08-29-13 04:20 AM EDT (US)     628 / 736  
So, despite me releasing a version 2.0, instead of working on a TAD version I'm still experimenting, trying to add more features. Bleh.

One of these is a new idea which would allow for a more visually appealing display. It does have a lot of limitations though, such as you not being able to view any other notifications sent until the display is toggled off. (well, to be honest this is a HUGE limitation, but come on, it looks way better!)

This is basically what I mean:
http://www.twitch.tv/aiz11/b/453161421

In the given example, 10 spoofed chats fit on the screen at any one time, so what the map does is send 10 notifications at a time, creating a flipbook effect.

For the other spaces I'd probably show something like the number of each type of unit in queue (with unit portrait icons).

I'm having a problem with one thing though: You may notice that using a spoofed chat from player 0 has a black box on the left. The reason I use a spoofed chat is because there is no notification sound played whenever a new chat arrives, as compared to a regular send chat.

Is it possible to remove either the black box or the sound which is played whenever a new notification is shown? My first thought is a change to the config, but there doesn't seem to be anything relevant in there.
posted 08-30-13 05:28 AM EDT (US)     629 / 736  
I'll show you two elemantary things:

a)using \n to put stuff on a new line

b)break the chat limitation by using strings. (could be done by XS User code in scenario editor)
for example
string s="\nsomething";

this is a part of my trigtemp

/**/ string s="\nsomething";
trChatSendSpoofed(0, "\nfood bla bla\nwood bla bla\ngold blabla "+s+""+s+""+s+""+s+""+s+""+s+"");

http://imageshack.us/f/856/64ta.jpg/

formatting + icons can still be done but is advised to be put them in strings and not in the chatline itself

and as you see the blackbox is not there by me. Your icon is broken

And note: that two or three such large chats can be displayed at the screen

another idea: use the resource panel to display em

btw i just watched a review and you did a good job


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack

[This message has been edited by Mister SCP (edited 08-30-2013 @ 05:52 AM).]

posted 08-30-13 09:31 AM EDT (US)     630 / 736  
Neat trick. I had no idea you could use \n in the chat functions. More space for me!

EDIT: Hmm it looks like this only works on TAD... guess that's more incentive to start working on that soon :P

And yea it does look like my icon is broken...

Would this 'breaking chat limitation' method also allow me to also show multiple icons in one chat? If so, what's the format I'd need to use?

Anyway, I only just found a way of solving the problem- it does seem possible to send normal non-spoofed chats without having the associated sound, if you use trBlockAllSounds then trSendChat then trUnblockAllSounds. Doesn't seem to affect existing sounds such as music/ unit sounds etc.

On showing resources/pop space in the default panel, the problem I have is there doesn't seem to be way to toggle it between players (for e.g. view p2's resources instead of p1's) without causing OOS, at least when observers are in a resigned state - deleting/tributing to fire triggers doesn't work.

And thanks, I put a lot of effort into the map so it's nice to see that it paid off . A lot of it wouldn't have been possible without you answering so many of my questions though, so thank you for that as well

I do have another question though... It might be more relevant for the modding discussion, but I'll post it here.

What I'd like to do (without actually modding the game) is hide most of the UI except for the minimap and minimap panel. My progress with this so far is hiding the following gadgets:

unitselectionpanel
commandpanel2-main
commandpanel2commands

The thing is, that this leaves a black background behind (the height of this changes according to if you're using minimized UI), which I have no idea how to remove. I think it is possible since I remember accidentally removing it somehow before while playing around with the console, but haven't been able to do it since.

[This message has been edited by Aizamk (edited 08-30-2013 @ 10:04 AM).]

posted 08-30-13 01:32 PM EDT (US)     631 / 736  
You can use this to get more icons. I also noticed that the \n function isnt supported in AOE3 nilla... what a shame.

string i="<icon=(20)units\artillery\cannon\cannon_portrait>lol";//");
trChatSend(1, ""+i+""+i+""+i+"");

I cant help you rly a your other problem (unluckily) without spending too much time on it


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack
posted 08-30-13 03:10 PM EDT (US)     632 / 736  
@Aizamk

You should try find Ekanta or Xentelian and ask them more about the UI.
I'm sure they know more about the resource gadget and the background behind the UI gadgets, since they made mods for it.

As far as I know, the colour behind the gadgets is set in the ui xmb.xml files in the data folder. In order to make it transparent you need to mod the files to make the background use alpha channels for transparency.

At least, I think that's why it works for me, because I have Ekanta's UI mod installed, so for each gadget I toggle off on nilla or TAD, I get to see the map instead of that black background.
posted 09-28-13 01:34 PM EDT (US)     633 / 736  
(EDIT: The question in my post above has been resolved in a different way.)

I'm trying to convert my Obz map to TAD. One of the features is a counter which shows units being trained, techs being researched etc. This counter uses the game icons, usually taken from the icon tag for the protounit in the protoy file.

The problem I'm having is that sometimes these show up as black, even when the path is correct. I can't seem to figure out why?

e.g.

<font=largeingame 24><icon=(60)(ui\units\native_villager_icon)>

Any one know if it's just my game or if there's a way around this?

[This message has been edited by Aizamk (edited 09-28-2013 @ 01:35 PM).]

posted 09-28-13 02:48 PM EDT (US)     634 / 736  
it's because \n is a special case which starts a new line. Use slash instead of backslash in front of the char "n" and other special chars


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack
posted 09-28-13 09:12 PM EDT (US)     635 / 736  
As always, thank you for your quick reply. This solves everything
posted 09-29-13 01:13 AM EDT (US)     636 / 736  
np
(EDIT: The question in my post above has been resolved in a different way.)
I m just a bit curious as I m aswell sometimes annoyed by the UI. Where you able to remove the black things nd made it transparent or completly disappear?

(I dont need an explantion if you used simple triggers like cinematic mode or toggle User Control)


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack

[This message has been edited by Mister SCP (edited 09-29-2013 @ 01:15 AM).]

posted 09-29-13 05:22 AM EDT (US)     637 / 736  
Well, at first I tried from a modding perspective, and it turned that you can remove the black background by (for the minimized ui) changing two numbers in uicommandpanelnewmin:

<gadget name="commandpanel2" type="commandpanel2" size1024="700 628 1024 768" z="5">

to

<gadget name="commandpanel2" type="commandpanel2" size1024="1024 768 1024 768" z="5">

Not sure why it works, but it does (basically changing the first two numbers seems to shift the black background up/down).

But I decided it was too impractical for general use since people would need to mod their game. You'd also need to remove the file for other purposes, since it also shifts the unit training queue ui down.

I expect someone with more modding experience could do the job properly- all I've done is identify that it's uicommandpanelnewmin that's causing the black background.

So in the end I added a hotkey which executes the commands uiToggleGame and gadgetReal("AGameMinimap") (the only UI available is the minimap) - it's slightly different from Simulation mode since it's possible to get back to normal.

I found that if you use a hotkey for handlePostGame() in this mode, then when you exit the postgame the UI is back to normal.

(EDIT: of course, this can't be used in general, but it works for observers since they're in a resigned state and so viewing the post game works)

(uiToggleGame doesn't actually toggle- it only hides the UI after one go and using the command twice doesn't do anything)

EDIT2: Also, thanks to your discovery about the deck gadget (homeCityCommandPanel) in the other thread, I've managed to add a command that shows both the deck of a specific player and the game at the same time . It's a two-step process though, since the gadget displays the deck most recently viewed. So people need to first view player 1 or 2's deck using a command, then press a hotkey which does

1) toggleHomeCityView - to hide the homecity
2) gadgetReal("homeCityCommandPanel") - to show the deck last viewed
3) gadgetUnreal("homeCityCardPanel-SelectPanel")- the game crashes if you accidentally click on "choose decks" when the homecity isnt actually loaded, so I had to hide that gadget just in case
4) uiClearSelection + gadgetUnreal("unitselectionpanel") - since the selection panel is in front of the deck ui.

If anyone's interested the method for showing the deck of a specific player using a command/hotkey was

1) trPlayerSetActive(plyr)
2) trShowHCView(plyr)
3) trPlayerSetActive(FP) - where FP= original player

[This message has been edited by Aizamk (edited 09-29-2013 @ 06:36 AM).]

posted 09-29-13 02:37 PM EDT (US)     638 / 736  
pretty interesting!

just a small comment
<gadget name="commandpanel2" type="commandpanel2" size1024="1024 768 1024 768" z="5">
The size is defined as x1 y1 x2 and y2. The gadget will be from 1024 to 1024 in x direction and from 768 to 768 in y-direction. As the values are the same you wont see it


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack

[This message has been edited by Mister SCP (edited 09-29-2013 @ 02:39 PM).]

posted 10-01-13 01:12 PM EDT (US)     639 / 736  
Ah ok, that makes sense then.

One more question: which file do I have to look at in order to see the available mercenaries and spawning probabilities for a specific map (e.g Great Plains) ? I thought it would be mercenaries.xs, but for me that only shows nilla mercs and I can't find units like the Elmeti in there.
posted 10-01-13 01:48 PM EDT (US)     640 / 736  
Data\mapspecifictechs.xml

I doubt that the mercenaries.xs works but just because the add merc dialog doesnt work aswell in the editor (the rm function is called rmAddMerc)


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack

[This message has been edited by Mister SCP (edited 10-01-2013 @ 01:51 PM).]

posted 10-01-13 09:46 PM EDT (US)     641 / 736  
Maptype decides the mercs spawn type for the first 2 units available at the saloon in age 2, but the last two ones which spawn in age 3 and 4 are most probably random (they can be any type, so not map-specific).
posted 10-02-13 03:35 AM EDT (US)     642 / 736  
Thanks for the replies- I was trying to artificially randomize the mercenaries so that I could detect which ones were available (for the unit counter, since I wanted to reduce lag by only showing those specific mercs), but since it's related to techs rather than rm commands it means I'd have to do a lot of xs insertion.

New question to do with icon formatting-sometimes theres a bunch of textures for different things in one file, e.g.

ui\techs\native\Dance3

I want to be able to show the correct part for the big button techs.

<Tech name ='BigIroquoisScoutingParty' type ='Normal'>
<DBID>2746</DBID>
<DisplayNameID>43616</DisplayNameID>
<Cost resourcetype ='Food'>500.0000</Cost>
<ResearchPoints>10.0000</ResearchPoints>
<Status>UNOBTAINABLE</Status>
<Icon>ui\techs\native\Dance3</Icon>
<IconTextureCoords>.599609375 .3046875 .796875 .60546875</IconTextureCoords>
<RolloverTextID>43615</RolloverTextID>
<Flag>NativeDance</Flag>
<Flag>CheckLandHCGatherPoint</Flag>
<Flag>CountsTowardMilitaryScore</Flag>
<Prereqs>
<TechStatus status ='Active'>Colonialize</TechStatus></Prereqs>
<Effects>
<Effect type ='Data' amount ='5.00' subtype ='FreeHomeCityUnit' unittype ='xpTomahawk' relativity ='Absolute'>
<Target type ='Player'></Target></Effect></Effects>
</Tech>


I tried

icon=(60)(ui\techs/native\Dance3)(.599609375 .3046875 .796875 .60546875)

But that just gives it a red overlay.

Is what I'm asking possible?
posted 10-04-13 00:35 AM EDT (US)     643 / 736  
I dont think the icon function support this


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack
posted 10-06-13 11:27 PM EDT (US)     644 / 736  
I had the impression that you pretty much ruined all the existing hotkeys and wanted to tell you how to avoid that:

So I think it has mainly to do with your intern console so you need to remap everything. Now the idea is to take the "Letter Loader" into another context like "earthquake" instead of "game". Now you might wonder how that would work since the gamer never ever enter the earthquake mode in the default game and the answer is we need to use the editmode command

->your console opens: + you add a new effect editmode("earthquake")
->player is typing in the text
->player press enter and now you also trigger the effect editmode("none")

Hope that helped


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack

[This message has been edited by Mister SCP (edited 10-06-2013 @ 11:27 PM).]

posted 10-07-13 04:10 AM EDT (US)     645 / 736  
Earthquake mode? What is that?

StormComing (to me): "Seems like you're way under-ranked"

Check out my series of guides for the scenario editor in the link below! | Best Otto TR score

The definitive collection of my scenarios, along with my scenario editor walkthrough, recorded games, and much much more!
posted 10-07-13 11:17 AM EDT (US)     646 / 736  
Everything IS done in earthquake mode- I'm not sure what you're referring to?

At the start of the game you're put into earthquake mode right away so that all the special hotkeys work, which is maybe why you got the impression that you did. It's also why I made people have to flare on the map to enter the 'admin' (earthquake) mode since I mapped mouse1up in flare mode to editmode("earthquake")

I think the only things which are mapped in game mode are '-' (to enter earthquake/admin mode) and 'h' (to show deck+ game)

@ anterior- earthquake mode is kind of a sub-mode, similar to the mode you're in when you're trying to flare on the map or when you're selecting a villager and trying to build something, or when you've pressed 'z' and are trying to attack move. Hotkeys can be made to work differently in each mode.

EDIT: basically every single one of the map features is made to work only in earthquake mode- it's not limited to the console, it includes ctrl+1 ... 5 etc

The console command 'x' sets editmode("none")

If maybe you were referring to this bit in my explanation "DO NOT CHECK THE HOTKEYS/ CHANGE THEM IN-GAME AS THIS WILL MESS UP THE MAP" then that's just telling them to not change them when the map is already loaded, since that resets any mappings made by the map script. It doesn't mean that the map overwrites any hotkeys theyve already made :P

EDIT2: So maybe they actually do (someone else described what you're saying), which is very strange... the only keys I mapped in 'game' are 'x' and 'h' and '-' and 'ctrl -'. The rest are mapped to earthquake. Might have to do a bit more testing for this.

EDIT3: Anyway he says the problem was 'x' and attack move, which I understand- I mapped 'x' to patrol mode (he mapped x to attack move, being a vanilla player) and didn't take it out in the end. That can easily be fixed.

[This message has been edited by Aizamk (edited 10-07-2013 @ 02:02 PM).]

posted 10-07-13 03:41 PM EDT (US)     647 / 736  
I didnt read your mapscript but i thought since you have to use ctrl-t for tc'S instead of "t" you didnt used these hotkey modes. Also if you need some more hotkey modes just ask. I have a good source
Might be also a nice idea to develop a UI for observers which can be fade in only in your game


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack

[This message has been edited by Mister SCP (edited 10-07-2013 @ 03:43 PM).]

posted 10-19-13 10:38 AM EDT (US)     648 / 736  
Ok, well do you know if there's any edit mode in which you can still drag select (but won't affect normal gameplay if you map keys in it)?

earthquake and createhull both seem to only allow selection of one unit at a time.

The UI thing seems interesting, but it seems like what it could do is limited- would it be able to fire events in the same way that hotkeys do? Anyway this would probably be a side project for later.

Would be nice if you could show the unit training queue or even resources of another player in a UI, but that's probably hardcoded.
posted 10-23-13 08:20 PM EDT (US)     649 / 736  
On the topic of modding, do you think it would be possible to make the fake counter or trmessagebox handle text in the same way the chat does? e.g. allow it to display icons etc, on new lines.

Would completely solve the problem of the current system preventing players from easily seeing what others chat or the treasures gathered etc, as then I could use trMessageBox(...) in a separate ui.

Or would it not be able to work that way?
posted 10-24-13 09:28 AM EDT (US)     650 / 736  
Ok, well do you know if there's any edit mode in which you can still drag select (but won't affect normal gameplay if you map keys in it)?

earthquake and createhull both seem to only allow selection of one unit at a time.
Here is a list of all modes I could find: Duno if another mode supports drag select. Also most of them are just used in editor and things like placeunit doesnt work online (luckily)
none moveAllMilitary selectTransportUnit placeHCGatherpoint placeTradeRoute attackMove AIDebug AILocSelect empower repair patrol guard ejectat camtrack triggroups trigger trigselect deleteunits roughen garrison definegrouping unitpaste terrainpaste copy playerCommsFlare flare nousercontrols cinematic specialpower rallyPoint setHomeCityWaterSpawnPoint setHomeCityGatherPoint setGatherPointEconomy setGatherPointMilitary setGatherPoint buildWall coveredwagon building createRiverShallow createRiver placeTrack paintterrainoverlay moveunit createhull earthquake modifyterrain smooth paintCliff editCliff editForest editWater paintWater placeunit paintforest paintmix paint paintsample elevationcircular elevationsample elevation
The UI thing seems interesting, but it seems like what it could do is limited- would it be able to fire events in the same way that hotkeys do? Anyway this would probably be a side project for later.
Well yes all this hotkey stuff wasnt designed for triggers but used to be UI functions. Also you can call some things directly while there is a limitation -> you cannot pass any informations into the UI (like telling the numbers for the sunColor effect)
Would be nice if you could show the unit training queue or even resources of another player in a UI, but that's probably hardcoded
At least not supported nativly as it would be a high advantage over other players in a 1vs1
On the topic of modding, do you think it would be possible to make the fake counter or trmessagebox handle text in the same way the chat does? e.g. allow it to display icons etc, on new lines.
duno but i think yes
Would completely solve the problem of the current system preventing players from easily seeing what others chat or the treasures gathered etc, as then I could use trMessageBox(...) in a separate ui.
it's no pleasure to edit the UI as soooo many things are hardcoded
Or would it not be able to work that way?
Didnt tested it yet, guess it's 51/49. You shouldnt be able to create new gadgets which will display chats but you might can exted the existing stuff


ESO2 Name:Sir_ConstantinESO Name:Sir_Pacman
Trigger Freak and Modder for AOE3

SCP Editor Tools---my map pack---Some incomplete stuff
My trigger Pack

[This message has been edited by Mister SCP (edited 10-24-2013 @ 09:31 AM).]

« Previous Page  1 ··· 10 ··· 20 ··· 24 25 26 27 28  Next Page »
Age of Empires III Heaven » Forums » Scenario Design » The RMS question Thread
Top
You must be logged in to post messages.
Please login or register
Hop to:    
Age of Empires III Heaven | HeavenGames