• Moose

nos.17

Member
  • Content Count

    857
  • Joined

  • Last Visited

  • Most Liked  

    5

Reputation Activity

  1. _Michael liked an article by nos.17, AutoHotkey as a Modding Tool   
    For those who are not familiar with it, Autohotkey is a fantastic open source program designed to replicate repetitive keyboard or mouse actions. As with any sort of coding, the possibilities are technically limitless, but so far I have used small script (about 20 lines) to save and open new exemplars in LeProp, and add/remove properties dozens of props in the Reader. What would have taken probably 20-30 minutes, one is able to achieve in under 5 seconds!
    As I said above, the possibilities are limitless, so I will make this tutorial as general as possible while showing examples of scripts I have created.
    This tutorial will be continuously updated as suggestions for inclusions are offered.
     
     
     Introduction 
    This tutorial is aimed towards any custom content creator who regularly, or semi-regularly has to perform repetitive tasks in the Reader or any other application. Simple text scripts can be used to quickly and easily automate such tasks. Skills learned can also be applied to any program or procedure outside of Sc4 also.
    This tutorial is worded simply so those with zero programming experience can complete their first script. This tutorial only covers a few of the basics. There are hundreds of more advanced functions for more experienced users. The AutoHotkey Help file is a great resource for this.
     
     
     Getting Started 
    Download AutoHotkey here. You will notice that there is no interface to start up and code into. This is because everything is done through simple text files.
    The first step is to identify a procedure you would like to automate, for example, adding Prop Family properties for a collection of 80 props. You will need to know exactly what you are doing for the task at hand. As you go through the process manually for the first few times, make careful notes of when and where you click, what you type in, etc. It may be helpful to write a procedure down on paper as you go.
    The second step is to create a new *.txt file that will be used for the script. It is not important at all what it is named or where it is placed. As long as its file extension is changed to *.ahk at some point, it will become associated with Autohotkey and everything will work fine.
     
     
     Sending Key Presses 
    The most basic command is the Send command. Typing
    Send asdf will, upon execution of the script, will type out asdf automatically. Not very useful you say? Yes, you’re right.
    Some special keys can be activated by enclosing their name in braces { }. Be careful here. Typing
    Send Enter will literally type out Enter as text: that is, the letter “E” followed by “n,” “t,” “e,” “r.” This does NOT have the same effect as pressing the enter button (obviously, typing “Enter” into Word will not put the cursor on a new line – the same concept applies to scripts). To simulate pressing the Enter button,
    Send {Enter} should be used instead. Other examples include {Shift}, {Delete}, {Tab}, etc.; for the arrow keys, {Up}, {Down}, {Left}, {Right} are the appropriate commands. Any of the other special keys are called using special characters instead:
    !  .......... Alt
    #.......... Windows
    +.......... Shift
    & ......... Used to combine two keys to a single new one (eg. f&g = hold “f” and press “g”)
    ^ ......... Ctrl
    < , > .... If there are a pair of keys, <! Signifies Left Alt and >! Signifies Right Alt; ! would trigger when any Alt is pressed, for example.
    From this, we can refine our script a little more:
    !u:: Send asdf Will type “asdf” when Alt and the 'u' key is pressed. A little more useful, don’t you think? Note the double colon after the statement. This demarks the start of the code that will be executed when those buttons are pressed. Adding a
    return demarks the end of the code for that hotkey. For simple scripts, it is not strictly needed, but for good practice, we will amend the code to include it anyways:
    !u:: Send asdf return  
     
     Sending Mouse Clicks 
    Every page can technically be operated without a mouse, but using 50 Tabs or Shift-Tabs to advance focus to the button you are looking for is inefficient, time-consuming, and dumb. There are numerous ways to do this; by far the simplest method is to use mouse clicks. The syntax
    Click xx, yy or, for a right click,
    Click right xx, yy simulates a left or right click at xx and yy, where xx and yy are the x and y coordinates of the button on the window you are using. Figuring out these coordinates will probably be the most time-consuming part. Fortunately, there is a tool which comes packaged with AHK that makes this process simple. Navigate to the AHK installation folder and run au3_spy.exe (or type it in the start menu).
    Among other things, the program will give you a live readout of the x and y coordinates of your mouse pointer for the current window and your overall screen. USE THE COORDINATES FOR THE CURRENT WINDOW. The “On Screen” coordinates are marked “less often used,” which is apt. You want to use the mouse position in the active window for numerous reasons, the largest being that if you drag the window around your screen, the Active Window coordinates will remain constant while the Screen coordinates will change.

     
    This is where careful notes come in handy. Going through the process manually with au3_spy open in the background, recording somewhere the x and y coordinates of any buttons needed in your task. For example, we could write a script that (in notepad) will paste something from the clipboard with minimal effort:
    !u:: Click right Send {Down}{Down}{Down}{Down}{Enter} return NOTE: In the example above, it is possible to use a mouse click to press the paste button instead of pressing Down 4x and enter, however, this method will be dependent on coordinates of the initial right click. Thus, many times it may be easier to chain arrow key commands instead of locating mouse positions.
     
    To transition to the next topic, suppose we have the following code:
    #s:: Click right Send {Down}{Down}{Down}{Enter}{Enter} return Which, when run on my internet browser (Chrome) will right click where the cursor is, open the save dialog box, and hit “Enter” to finalize the save. Run it, and you will notice that it does not entirely do what we want it to do. It will open the save dialog box, but the second enter (to finalize the save) does not seem to execute.
    This is a simple error in timing. When the script executes, all of the commands are sent instantaneously. This is the ideal condition; in real life, however, it takes some amount of time to do everything. Even a time of fractions of a millisecond is enough to throw your code off. If you manually right click and hit save, there will indeed be a small delay until the dialog box appears. Syncing everything may seem like a difficult fix, but the code required is quite simple.
     
     
     Opening New Windows 
    AHK sends its commands very quickly (as it is supposed to do). If click on any buttons that activate new windows or dialog boxes, you may run into problems. As mentioned above, the script will execute correctly, but not as intended; rather, it will send some (or all) of the commands in the time it takes for the message box to appear and become active. The solution is to wait until the new window is active and ready for input. Simply use the command
    Winwait, xxxxxx where xxxxxx is the full or partial title of the window. It is important to note that this string can either be the full exact title or just the first few characters. For example, if I am editing a file called nos.17_VehiculosFamilias_1c90deg.dat, I could type
    Winwait, nos.17 Using just “nos.17” is enough for the script to recognize which window it is waiting on.
    If the title is not explicitly stated in the window like it is below,

    Windows Task Manager can give you the appropriate name.

    Remember, only the first part of a window name is required. If the name is long or complex, the first few letters should suffice.
     
     
     
     Loops 
    To repeat tasks multiple times, one could either copy and paste the commands the necessary number of times, or use loops. Loops, if you are not familiar with them, will simply repeat the tasks within the braces { } a specified number of times for example,
    Loop, 4 { Send ^v Send {Enter} } would paste whatever is in the clipboard five times on a new line (another description). For obvious reasons, this method is preferred for larger numbers but is also easier to read and debug for small numbers (like 4) too. NOTE: The number in the loop control starts at 0. So if you want something to happen 4 times you will need to enter 3 (0 1 2 3), and so on. The general equation for the number of times you want to loop: n-1. If you’re interested why, (1) and (2); if not, just try and remember that.
     
     
     
     Comments 
    Comments are used for your convenience. Comments are bodies of text that the computer skips over and will not execute - their purpose is to either explain what should happen when some code executes or anything else the programmer wants to say. As such, they are never required but always recommended. In AutoHotkey, everything after a semicolon (;) on the same line will not parse (they will be completely ignored by the computer). An example:
    Click 380,590 ; Click Apply Everything after the semicolon ( Click Apply) will be ignored by the computer. It is only for my benefit to remember what each line is supposed to do. Comments in no way are required on every line. I've merely included them for sake of clarity so others can read my code.
     
     
     
     Saving and Running the Script 
    Whenever you are finished. Simply save your notepad document. If you haven’t already, change the extension from *.txt to *.ahk. Windows might give you a warning telling you that changing the extension may make the file unstable – this is generally a good warning but not applicable here and can be ignored. Changing *.txt to *.ahk will in no way change anything in the file – it will simply associate that file as an AutoHotkey script instead of a lowly text file.
    Once the file is renamed, right click on it and you should see some additional options in the menu.

    “Run Script” will make the script become active. Hit whatever hotkey(s) you assigned, and your script will execute every time you press the key(s). You will see an icon appear in your system tray. Right clicking there will allow you to do a few different things, including closing the script so it will no longer run (Exit). “Compile Script” will automatically convert the script to a *.exe file. It can be exited in the same fashion from the system tray. “Edit Script” opens the notepad file and allows the script to be edited. Note that just double clicking like normal to open the file actually has the same effect of “Run Script.” This is one of the other results of changing the file extension to *.ahk.      
    “Open” “Help” opens the AutoHotkey help documents which can be a great help in finding the correct syntax. “Window Spy” launches au3_spy.exe. See the "Sending Mouse Clicks" subsection for an explanation of its purpose. “Reload This Script” recompiles the script. If any changes were made, they will now be active. “Edit This Script” opens the notepad file and allows the script to be edited in whichever editor you assigned as default for the *.ahk extension. “Suspend Hotkeys” will keep the script active but disable any hotkeys mapped within the script. Useful if the key combination you assigned is actually used in some other program. The H tray icon will be replaced with a similar looking icon, but with an S. “Pause Script” prevents any part of the script from running until it is manually resumed. The tray icon will be replaced with a red one. “Compile Script” will automatically convert the script to a *.exe file. It can be exited in the same fashion from the system tray. “Exit” completely closes and ends the AutoHotkey process.  
     
     Examples 
    There is simply an immense amount of things one can do with AutoHotkey scripts. However, the things outlined above should be enough to complete most of your scripts for SC4 modding (they’re all I’ve used so far).
    To make your own, identify something repetitive that you do that can be easily scripted. The two examples below detail my method of solving these problems. As with coding, a multitude of approaches exist, and the only incorrect one is the one that does not work (or perhaps takes an inordinate amount of time).
     
    LeProp_SaveClose.ahk
    For those that do not know, LeProp has a peculiar bug where it can only save one action at a time. As such, one needs to close and reopen to edit multiple things on a lot. It can be quite tedious having to save, close, navigate to, and run the LeProp executable. This script is designed to fix that.
    !x:: Click 380,590 ; Click Apply Click 550,120  ; Click Save WinWaitActive, LEProp ; Wait for “Save Successful!” dialogue box Send {Enter} ; Closes “Save Successful!” dialogue box WinWaitActive, iLive ; Waits for main window to be active (“Save Successful!” dialogue box is fully closed) Send {Esc} ; Close LeProp run, C:\Program Files (x86)\iLives\LEProp.exe ; Opens LeProp WinWaitActive, Ilive ; Waits for main window to be active Send {Enter} ; Opens the “Open File” window
     
    Reader_Add_BuildingPropFamily.ahk
    #a::     ; Hit Windows-a to activate Click right 1200, 600        ; Right click in the right pane Send {Down} {Down} {Down} {Down} {Enter}  ; Select “Add Property” WinWaitActive, Property :             ; Wait for Property editor to appear Click 425, 50      ; Click to expand the Name menu Send buil ; Type to scroll list to Building/prop Family Click 250, 105     ; Select Building/prop Family Click 450, 255     ; Select Add Click 40, 635      ; Click in the Values as text field Click 40, 635      ; Not sure why I have this twice Send 0x5f85e126    ; Your prop family IID goes here Click 435, 635     ; Hit first Apply Click 190, 700     ; Hit Second Apply WinWaitActive, Reader  ; Change to Reader main window name; partial name is acceptable Click 1200, 235   ; Click on Building/prop family property Send ^c ; Copies that property to the clipboard Click 870, 1000   ; Click to place focus in the left pane Send {Down}       ; Move down to select next exemplar   Loop, 257     ; Change to number of exemplars starting count at 0: e.g. if last num is 65, use 66 { Click 1200, 600   ; Click to place focus in the right pane Send ^v            ; Paste the property Click 870, 1000   ; Click to place focus in the left pane Send {Down}       ; Move down to select next exemplar }                  ; Repeat
     
     
     Conclusion 
      If anyone has questions or needs help on their scripts, I will be happy to help. If I don't start a thread, just shoot me a PM and we can work out your problems together. Happy modding! ...
  2. nos.17 liked an article by rsc204, What is Hex... Numbers don't hurt me...   
    Intro
    So here I'd like to just very quickly explain the differences between the Decimal numbering system, you know, the one we use everyday for money, counting, calculations etc, and Hexadecimal. I suspect, few out there would have need to use the latter of those. But let's say you want to make mods for SC4, at this point Hex (short for Hexadecimal) is something you may need to understand. It's really not that complex, you just need to think differently, because in Hex, we also use letters for numbers. Rather than try to pick that apart badly, I think it's much easier to show you how that works in practise. We'll get to that, but quickly, I should explain the basics first...
    So in SC4, we have three groups of Hex IDs for every object/item used by the game. In many cases you don't need to know anything about them, lots for example are all assigned them automatically, as are BAT models. But, certain objects you might wish to create, will require a reserved range of IDs, which you must request. You will only be able to use those IDs you are allocated, but there seems to be a lot of confusion about how to use these most efficiently. For now, I'm going to attempt to simply explain this. But I hope in future to expand this tutorial a little, along with providing some useful tools to take all the complicated parts of using such IDs out of the equation.
    So let's quickly see which objects will require a dedicated ID range:
    Game Textures for Lots or Transit Networks Prop/Building or Flora Families MMPs (Mayor Mode Ploppables). I plan to update this section with more info and links to reserve a range in due course, bear with me.
    A quick note about TGI's (ID's/IID's)
    What is a TGI? That simply stands for Type, Group and Instance. Instance IDs are sometimes referred to as IIDs.
    Type, Group and Instance numbers for SC4 are each in 8-digit Hexadecimal format. Here's an example of that:
    0x7AB50E44 - 0x01234567 - 0x89ABCDEF
    You can simply think of the three groups of eight digits as a telephone number. The game looks for an object, by "dialing" its ID number. Think of the Type, Group and Instance parts, as much like an International Dialling Code, Area Code and Local Number. Sometimes you just need the local number. Others times you'll need the Area Code as well, sometimes you need all three.
    Usually both the Type and Group IDs are set, that is to say, you have to use specific ones, depending on the type of item. So for example, 0x7AB50E44 as a Type ID, means the item should be a texture. The group ID is like a subcategory, in the case of textures, those for game networks, like NAM's roads use 0x1ABE787D, whereas Lot Textures use group 0x0986135E. But, it's the last ID, the instance or IID we're most interested in here.
    That's a unique instance for your objects. If you are provided a range, almost certainly, you will be using the IID only. One thing to mention here, each 8-digit ID above is prefixed by 0x, I should explain this before continuing. This is just the way that Hex numbers are formatted. Depending on the application used or method of entry, you may need to include it, you may not. I know that seems less than helpful, but it'll make sense when you get there. If you are having problems, always check the format, perhaps you've missed or accidentally included the prefix, either can be a potential source of trouble.
    Why Hex in the first place?
    The answer to why computers use Hex is remarkably simple, it provides orders of magnitude more "space", using the same amount of data. But rather than trying to dwell on that too much, let's jump to an example that everyone can follow.
    When you get assigned a range of IDs for the IID, you will have a "family" or multiple "families" of IIDs. Much like with our phone number example, a family is simply the first few digits that remain the same for each ID. For this section, let's assume you've been assigned the family AAAA####. Where the # characters are digits you will need to decide upon to make your unique IDs.
    Let's look at how that would work, if the last 4 digits were using a traditional Decimal system:
    AAAA0000 - AAAA0009 = 10 Unique IDs AAAA0010 - AAAA0099 = 10x10 or 100 IDs  AAAA0100 - AAAA0999 = 10x10x10 or 1,000 IDs AAAA1000 - AAAA9999 = 10x10x10x10 or 10,000 IDs
    (Note that these calculations are cumulative, i.e. each includes the # of IDs from the previous line in the total) Now, let's look at the difference, just from adding 6 new numbers, i.e. a BASE 16 numbering system or Hex. Because we only have numbers 0-9 in the real world, Hex uses A through F to represent 10 through 16, whilst only using one character. Also note that 0 = 1 in this system, which makes sense if you think about it, 0 is after all a number. Don't focus on that too much, it's not so important.
    AAAA0000 - AAAA000F = 16 Unique IDs, no big change AAAA0010 - AAAA00FF = 16x16 or 256 IDs, look at that, already we've over twice the number of IDs the decimal system would offer. AAAA0100 - AAAA0FFF = 16x16x16 IDs or 4,096, now it's four times as many. AAAA1000 - AAAAFFFF = 16x16x16x16 IDs or 65,536, and we're up to six and a half times the number.
    If we follow this through all 8 digits, in decimal you've have a total of:
    100,000,000 IDs
    That's a lot, but with Hex, we end up with:
    4,294,967,296 IDs
    So for the exact same amount of data or space used, Hex gives us orders of magnitude more IDs to work with. So Hex is a very useful system indeed. Now think about this, each object in the game must have a unique ID. By having so many possibilities, it greatly reduces the chances that two will accidentally end up the same. Almost every time this happens, it's not the computer, its users using IDs they shouldn't have.
    If you have an assigned range for something, use those IDs ONLY.
    If you are working on something without assigned IDs, DO NOT manually create IDs yourself unless you have no other option.
    Mathematically speaking, the odds of a randomly generated ID conflicting are infinitesimally small. You've literally more chance of winning the lottery. But people, unlike random generators, often think alike or like to use similar patterns. So if the option exists to have a random ID, use it. Almost certainly it will be better for you and the wider community. Conflicts can be a big pain to find when they do occur.
    Speaking of conflicts, actually, sometimes those are useful, we may want an ID to conflict with another. Why? Well let's imagine you want to override an object in the game or from another creator, because you've altered it somehow. If your version has the same ID, it will conflict with the original. But SC4 is smartly designed, if it notices this, it will only use the last item loaded with the same ID. I.e., SC4 will override objects where conflicts occur. The only caveats here are that the object must load later than the one you are overriding. Also that some very specific instances will not work this way. For example, that's why the I-HT fix must be DAT-Packed to work, you can't override that particular file.
    How to use Hex efficiently?
    For now I'm going to cut this here... consider this a WIP. But when I resume work on this guide, I will cover all you need to know about using a range assigned to you in the best possible way. Remember that numbers, Hex or otherwise increment from the right side. When the last digit reaches 9, instead of moving one digit left and using 10, we jump from 9-A. Then through B to F, only after F do we use 10, which is actually 17. That seems like a really complicated thing to understand. But try to remember, you don't need to know what the decimal equivalent is in most cases, you only need to input the correct IDs in order. So 9, A, B, C, D, E, F then 10, it's really quite simple when you don't focus too much on the actual decimal numbers.

  3. _Michael liked an article by nos.17, AutoHotkey as a Modding Tool   
    For those who are not familiar with it, Autohotkey is a fantastic open source program designed to replicate repetitive keyboard or mouse actions. As with any sort of coding, the possibilities are technically limitless, but so far I have used small script (about 20 lines) to save and open new exemplars in LeProp, and add/remove properties dozens of props in the Reader. What would have taken probably 20-30 minutes, one is able to achieve in under 5 seconds!
    As I said above, the possibilities are limitless, so I will make this tutorial as general as possible while showing examples of scripts I have created.
    This tutorial will be continuously updated as suggestions for inclusions are offered.
     
     
     Introduction 
    This tutorial is aimed towards any custom content creator who regularly, or semi-regularly has to perform repetitive tasks in the Reader or any other application. Simple text scripts can be used to quickly and easily automate such tasks. Skills learned can also be applied to any program or procedure outside of Sc4 also.
    This tutorial is worded simply so those with zero programming experience can complete their first script. This tutorial only covers a few of the basics. There are hundreds of more advanced functions for more experienced users. The AutoHotkey Help file is a great resource for this.
     
     
     Getting Started 
    Download AutoHotkey here. You will notice that there is no interface to start up and code into. This is because everything is done through simple text files.
    The first step is to identify a procedure you would like to automate, for example, adding Prop Family properties for a collection of 80 props. You will need to know exactly what you are doing for the task at hand. As you go through the process manually for the first few times, make careful notes of when and where you click, what you type in, etc. It may be helpful to write a procedure down on paper as you go.
    The second step is to create a new *.txt file that will be used for the script. It is not important at all what it is named or where it is placed. As long as its file extension is changed to *.ahk at some point, it will become associated with Autohotkey and everything will work fine.
     
     
     Sending Key Presses 
    The most basic command is the Send command. Typing
    Send asdf will, upon execution of the script, will type out asdf automatically. Not very useful you say? Yes, you’re right.
    Some special keys can be activated by enclosing their name in braces { }. Be careful here. Typing
    Send Enter will literally type out Enter as text: that is, the letter “E” followed by “n,” “t,” “e,” “r.” This does NOT have the same effect as pressing the enter button (obviously, typing “Enter” into Word will not put the cursor on a new line – the same concept applies to scripts). To simulate pressing the Enter button,
    Send {Enter} should be used instead. Other examples include {Shift}, {Delete}, {Tab}, etc.; for the arrow keys, {Up}, {Down}, {Left}, {Right} are the appropriate commands. Any of the other special keys are called using special characters instead:
    !  .......... Alt
    #.......... Windows
    +.......... Shift
    & ......... Used to combine two keys to a single new one (eg. f&g = hold “f” and press “g”)
    ^ ......... Ctrl
    < , > .... If there are a pair of keys, <! Signifies Left Alt and >! Signifies Right Alt; ! would trigger when any Alt is pressed, for example.
    From this, we can refine our script a little more:
    !u:: Send asdf Will type “asdf” when Alt and the 'u' key is pressed. A little more useful, don’t you think? Note the double colon after the statement. This demarks the start of the code that will be executed when those buttons are pressed. Adding a
    return demarks the end of the code for that hotkey. For simple scripts, it is not strictly needed, but for good practice, we will amend the code to include it anyways:
    !u:: Send asdf return  
     
     Sending Mouse Clicks 
    Every page can technically be operated without a mouse, but using 50 Tabs or Shift-Tabs to advance focus to the button you are looking for is inefficient, time-consuming, and dumb. There are numerous ways to do this; by far the simplest method is to use mouse clicks. The syntax
    Click xx, yy or, for a right click,
    Click right xx, yy simulates a left or right click at xx and yy, where xx and yy are the x and y coordinates of the button on the window you are using. Figuring out these coordinates will probably be the most time-consuming part. Fortunately, there is a tool which comes packaged with AHK that makes this process simple. Navigate to the AHK installation folder and run au3_spy.exe (or type it in the start menu).
    Among other things, the program will give you a live readout of the x and y coordinates of your mouse pointer for the current window and your overall screen. USE THE COORDINATES FOR THE CURRENT WINDOW. The “On Screen” coordinates are marked “less often used,” which is apt. You want to use the mouse position in the active window for numerous reasons, the largest being that if you drag the window around your screen, the Active Window coordinates will remain constant while the Screen coordinates will change.

     
    This is where careful notes come in handy. Going through the process manually with au3_spy open in the background, recording somewhere the x and y coordinates of any buttons needed in your task. For example, we could write a script that (in notepad) will paste something from the clipboard with minimal effort:
    !u:: Click right Send {Down}{Down}{Down}{Down}{Enter} return NOTE: In the example above, it is possible to use a mouse click to press the paste button instead of pressing Down 4x and enter, however, this method will be dependent on coordinates of the initial right click. Thus, many times it may be easier to chain arrow key commands instead of locating mouse positions.
     
    To transition to the next topic, suppose we have the following code:
    #s:: Click right Send {Down}{Down}{Down}{Enter}{Enter} return Which, when run on my internet browser (Chrome) will right click where the cursor is, open the save dialog box, and hit “Enter” to finalize the save. Run it, and you will notice that it does not entirely do what we want it to do. It will open the save dialog box, but the second enter (to finalize the save) does not seem to execute.
    This is a simple error in timing. When the script executes, all of the commands are sent instantaneously. This is the ideal condition; in real life, however, it takes some amount of time to do everything. Even a time of fractions of a millisecond is enough to throw your code off. If you manually right click and hit save, there will indeed be a small delay until the dialog box appears. Syncing everything may seem like a difficult fix, but the code required is quite simple.
     
     
     Opening New Windows 
    AHK sends its commands very quickly (as it is supposed to do). If click on any buttons that activate new windows or dialog boxes, you may run into problems. As mentioned above, the script will execute correctly, but not as intended; rather, it will send some (or all) of the commands in the time it takes for the message box to appear and become active. The solution is to wait until the new window is active and ready for input. Simply use the command
    Winwait, xxxxxx where xxxxxx is the full or partial title of the window. It is important to note that this string can either be the full exact title or just the first few characters. For example, if I am editing a file called nos.17_VehiculosFamilias_1c90deg.dat, I could type
    Winwait, nos.17 Using just “nos.17” is enough for the script to recognize which window it is waiting on.
    If the title is not explicitly stated in the window like it is below,

    Windows Task Manager can give you the appropriate name.

    Remember, only the first part of a window name is required. If the name is long or complex, the first few letters should suffice.
     
     
     
     Loops 
    To repeat tasks multiple times, one could either copy and paste the commands the necessary number of times, or use loops. Loops, if you are not familiar with them, will simply repeat the tasks within the braces { } a specified number of times for example,
    Loop, 4 { Send ^v Send {Enter} } would paste whatever is in the clipboard five times on a new line (another description). For obvious reasons, this method is preferred for larger numbers but is also easier to read and debug for small numbers (like 4) too. NOTE: The number in the loop control starts at 0. So if you want something to happen 4 times you will need to enter 3 (0 1 2 3), and so on. The general equation for the number of times you want to loop: n-1. If you’re interested why, (1) and (2); if not, just try and remember that.
     
     
     
     Comments 
    Comments are used for your convenience. Comments are bodies of text that the computer skips over and will not execute - their purpose is to either explain what should happen when some code executes or anything else the programmer wants to say. As such, they are never required but always recommended. In AutoHotkey, everything after a semicolon (;) on the same line will not parse (they will be completely ignored by the computer). An example:
    Click 380,590 ; Click Apply Everything after the semicolon ( Click Apply) will be ignored by the computer. It is only for my benefit to remember what each line is supposed to do. Comments in no way are required on every line. I've merely included them for sake of clarity so others can read my code.
     
     
     
     Saving and Running the Script 
    Whenever you are finished. Simply save your notepad document. If you haven’t already, change the extension from *.txt to *.ahk. Windows might give you a warning telling you that changing the extension may make the file unstable – this is generally a good warning but not applicable here and can be ignored. Changing *.txt to *.ahk will in no way change anything in the file – it will simply associate that file as an AutoHotkey script instead of a lowly text file.
    Once the file is renamed, right click on it and you should see some additional options in the menu.

    “Run Script” will make the script become active. Hit whatever hotkey(s) you assigned, and your script will execute every time you press the key(s). You will see an icon appear in your system tray. Right clicking there will allow you to do a few different things, including closing the script so it will no longer run (Exit). “Compile Script” will automatically convert the script to a *.exe file. It can be exited in the same fashion from the system tray. “Edit Script” opens the notepad file and allows the script to be edited. Note that just double clicking like normal to open the file actually has the same effect of “Run Script.” This is one of the other results of changing the file extension to *.ahk.      
    “Open” “Help” opens the AutoHotkey help documents which can be a great help in finding the correct syntax. “Window Spy” launches au3_spy.exe. See the "Sending Mouse Clicks" subsection for an explanation of its purpose. “Reload This Script” recompiles the script. If any changes were made, they will now be active. “Edit This Script” opens the notepad file and allows the script to be edited in whichever editor you assigned as default for the *.ahk extension. “Suspend Hotkeys” will keep the script active but disable any hotkeys mapped within the script. Useful if the key combination you assigned is actually used in some other program. The H tray icon will be replaced with a similar looking icon, but with an S. “Pause Script” prevents any part of the script from running until it is manually resumed. The tray icon will be replaced with a red one. “Compile Script” will automatically convert the script to a *.exe file. It can be exited in the same fashion from the system tray. “Exit” completely closes and ends the AutoHotkey process.  
     
     Examples 
    There is simply an immense amount of things one can do with AutoHotkey scripts. However, the things outlined above should be enough to complete most of your scripts for SC4 modding (they’re all I’ve used so far).
    To make your own, identify something repetitive that you do that can be easily scripted. The two examples below detail my method of solving these problems. As with coding, a multitude of approaches exist, and the only incorrect one is the one that does not work (or perhaps takes an inordinate amount of time).
     
    LeProp_SaveClose.ahk
    For those that do not know, LeProp has a peculiar bug where it can only save one action at a time. As such, one needs to close and reopen to edit multiple things on a lot. It can be quite tedious having to save, close, navigate to, and run the LeProp executable. This script is designed to fix that.
    !x:: Click 380,590 ; Click Apply Click 550,120  ; Click Save WinWaitActive, LEProp ; Wait for “Save Successful!” dialogue box Send {Enter} ; Closes “Save Successful!” dialogue box WinWaitActive, iLive ; Waits for main window to be active (“Save Successful!” dialogue box is fully closed) Send {Esc} ; Close LeProp run, C:\Program Files (x86)\iLives\LEProp.exe ; Opens LeProp WinWaitActive, Ilive ; Waits for main window to be active Send {Enter} ; Opens the “Open File” window
     
    Reader_Add_BuildingPropFamily.ahk
    #a::     ; Hit Windows-a to activate Click right 1200, 600        ; Right click in the right pane Send {Down} {Down} {Down} {Down} {Enter}  ; Select “Add Property” WinWaitActive, Property :             ; Wait for Property editor to appear Click 425, 50      ; Click to expand the Name menu Send buil ; Type to scroll list to Building/prop Family Click 250, 105     ; Select Building/prop Family Click 450, 255     ; Select Add Click 40, 635      ; Click in the Values as text field Click 40, 635      ; Not sure why I have this twice Send 0x5f85e126    ; Your prop family IID goes here Click 435, 635     ; Hit first Apply Click 190, 700     ; Hit Second Apply WinWaitActive, Reader  ; Change to Reader main window name; partial name is acceptable Click 1200, 235   ; Click on Building/prop family property Send ^c ; Copies that property to the clipboard Click 870, 1000   ; Click to place focus in the left pane Send {Down}       ; Move down to select next exemplar   Loop, 257     ; Change to number of exemplars starting count at 0: e.g. if last num is 65, use 66 { Click 1200, 600   ; Click to place focus in the right pane Send ^v            ; Paste the property Click 870, 1000   ; Click to place focus in the left pane Send {Down}       ; Move down to select next exemplar }                  ; Repeat
     
     
     Conclusion 
      If anyone has questions or needs help on their scripts, I will be happy to help. If I don't start a thread, just shoot me a PM and we can work out your problems together. Happy modding! ...
  4. _Michael liked an article by nos.17, AutoHotkey as a Modding Tool   
    For those who are not familiar with it, Autohotkey is a fantastic open source program designed to replicate repetitive keyboard or mouse actions. As with any sort of coding, the possibilities are technically limitless, but so far I have used small script (about 20 lines) to save and open new exemplars in LeProp, and add/remove properties dozens of props in the Reader. What would have taken probably 20-30 minutes, one is able to achieve in under 5 seconds!
    As I said above, the possibilities are limitless, so I will make this tutorial as general as possible while showing examples of scripts I have created.
    This tutorial will be continuously updated as suggestions for inclusions are offered.
     
     
     Introduction 
    This tutorial is aimed towards any custom content creator who regularly, or semi-regularly has to perform repetitive tasks in the Reader or any other application. Simple text scripts can be used to quickly and easily automate such tasks. Skills learned can also be applied to any program or procedure outside of Sc4 also.
    This tutorial is worded simply so those with zero programming experience can complete their first script. This tutorial only covers a few of the basics. There are hundreds of more advanced functions for more experienced users. The AutoHotkey Help file is a great resource for this.
     
     
     Getting Started 
    Download AutoHotkey here. You will notice that there is no interface to start up and code into. This is because everything is done through simple text files.
    The first step is to identify a procedure you would like to automate, for example, adding Prop Family properties for a collection of 80 props. You will need to know exactly what you are doing for the task at hand. As you go through the process manually for the first few times, make careful notes of when and where you click, what you type in, etc. It may be helpful to write a procedure down on paper as you go.
    The second step is to create a new *.txt file that will be used for the script. It is not important at all what it is named or where it is placed. As long as its file extension is changed to *.ahk at some point, it will become associated with Autohotkey and everything will work fine.
     
     
     Sending Key Presses 
    The most basic command is the Send command. Typing
    Send asdf will, upon execution of the script, will type out asdf automatically. Not very useful you say? Yes, you’re right.
    Some special keys can be activated by enclosing their name in braces { }. Be careful here. Typing
    Send Enter will literally type out Enter as text: that is, the letter “E” followed by “n,” “t,” “e,” “r.” This does NOT have the same effect as pressing the enter button (obviously, typing “Enter” into Word will not put the cursor on a new line – the same concept applies to scripts). To simulate pressing the Enter button,
    Send {Enter} should be used instead. Other examples include {Shift}, {Delete}, {Tab}, etc.; for the arrow keys, {Up}, {Down}, {Left}, {Right} are the appropriate commands. Any of the other special keys are called using special characters instead:
    !  .......... Alt
    #.......... Windows
    +.......... Shift
    & ......... Used to combine two keys to a single new one (eg. f&g = hold “f” and press “g”)
    ^ ......... Ctrl
    < , > .... If there are a pair of keys, <! Signifies Left Alt and >! Signifies Right Alt; ! would trigger when any Alt is pressed, for example.
    From this, we can refine our script a little more:
    !u:: Send asdf Will type “asdf” when Alt and the 'u' key is pressed. A little more useful, don’t you think? Note the double colon after the statement. This demarks the start of the code that will be executed when those buttons are pressed. Adding a
    return demarks the end of the code for that hotkey. For simple scripts, it is not strictly needed, but for good practice, we will amend the code to include it anyways:
    !u:: Send asdf return  
     
     Sending Mouse Clicks 
    Every page can technically be operated without a mouse, but using 50 Tabs or Shift-Tabs to advance focus to the button you are looking for is inefficient, time-consuming, and dumb. There are numerous ways to do this; by far the simplest method is to use mouse clicks. The syntax
    Click xx, yy or, for a right click,
    Click right xx, yy simulates a left or right click at xx and yy, where xx and yy are the x and y coordinates of the button on the window you are using. Figuring out these coordinates will probably be the most time-consuming part. Fortunately, there is a tool which comes packaged with AHK that makes this process simple. Navigate to the AHK installation folder and run au3_spy.exe (or type it in the start menu).
    Among other things, the program will give you a live readout of the x and y coordinates of your mouse pointer for the current window and your overall screen. USE THE COORDINATES FOR THE CURRENT WINDOW. The “On Screen” coordinates are marked “less often used,” which is apt. You want to use the mouse position in the active window for numerous reasons, the largest being that if you drag the window around your screen, the Active Window coordinates will remain constant while the Screen coordinates will change.

     
    This is where careful notes come in handy. Going through the process manually with au3_spy open in the background, recording somewhere the x and y coordinates of any buttons needed in your task. For example, we could write a script that (in notepad) will paste something from the clipboard with minimal effort:
    !u:: Click right Send {Down}{Down}{Down}{Down}{Enter} return NOTE: In the example above, it is possible to use a mouse click to press the paste button instead of pressing Down 4x and enter, however, this method will be dependent on coordinates of the initial right click. Thus, many times it may be easier to chain arrow key commands instead of locating mouse positions.
     
    To transition to the next topic, suppose we have the following code:
    #s:: Click right Send {Down}{Down}{Down}{Enter}{Enter} return Which, when run on my internet browser (Chrome) will right click where the cursor is, open the save dialog box, and hit “Enter” to finalize the save. Run it, and you will notice that it does not entirely do what we want it to do. It will open the save dialog box, but the second enter (to finalize the save) does not seem to execute.
    This is a simple error in timing. When the script executes, all of the commands are sent instantaneously. This is the ideal condition; in real life, however, it takes some amount of time to do everything. Even a time of fractions of a millisecond is enough to throw your code off. If you manually right click and hit save, there will indeed be a small delay until the dialog box appears. Syncing everything may seem like a difficult fix, but the code required is quite simple.
     
     
     Opening New Windows 
    AHK sends its commands very quickly (as it is supposed to do). If click on any buttons that activate new windows or dialog boxes, you may run into problems. As mentioned above, the script will execute correctly, but not as intended; rather, it will send some (or all) of the commands in the time it takes for the message box to appear and become active. The solution is to wait until the new window is active and ready for input. Simply use the command
    Winwait, xxxxxx where xxxxxx is the full or partial title of the window. It is important to note that this string can either be the full exact title or just the first few characters. For example, if I am editing a file called nos.17_VehiculosFamilias_1c90deg.dat, I could type
    Winwait, nos.17 Using just “nos.17” is enough for the script to recognize which window it is waiting on.
    If the title is not explicitly stated in the window like it is below,

    Windows Task Manager can give you the appropriate name.

    Remember, only the first part of a window name is required. If the name is long or complex, the first few letters should suffice.
     
     
     
     Loops 
    To repeat tasks multiple times, one could either copy and paste the commands the necessary number of times, or use loops. Loops, if you are not familiar with them, will simply repeat the tasks within the braces { } a specified number of times for example,
    Loop, 4 { Send ^v Send {Enter} } would paste whatever is in the clipboard five times on a new line (another description). For obvious reasons, this method is preferred for larger numbers but is also easier to read and debug for small numbers (like 4) too. NOTE: The number in the loop control starts at 0. So if you want something to happen 4 times you will need to enter 3 (0 1 2 3), and so on. The general equation for the number of times you want to loop: n-1. If you’re interested why, (1) and (2); if not, just try and remember that.
     
     
     
     Comments 
    Comments are used for your convenience. Comments are bodies of text that the computer skips over and will not execute - their purpose is to either explain what should happen when some code executes or anything else the programmer wants to say. As such, they are never required but always recommended. In AutoHotkey, everything after a semicolon (;) on the same line will not parse (they will be completely ignored by the computer). An example:
    Click 380,590 ; Click Apply Everything after the semicolon ( Click Apply) will be ignored by the computer. It is only for my benefit to remember what each line is supposed to do. Comments in no way are required on every line. I've merely included them for sake of clarity so others can read my code.
     
     
     
     Saving and Running the Script 
    Whenever you are finished. Simply save your notepad document. If you haven’t already, change the extension from *.txt to *.ahk. Windows might give you a warning telling you that changing the extension may make the file unstable – this is generally a good warning but not applicable here and can be ignored. Changing *.txt to *.ahk will in no way change anything in the file – it will simply associate that file as an AutoHotkey script instead of a lowly text file.
    Once the file is renamed, right click on it and you should see some additional options in the menu.

    “Run Script” will make the script become active. Hit whatever hotkey(s) you assigned, and your script will execute every time you press the key(s). You will see an icon appear in your system tray. Right clicking there will allow you to do a few different things, including closing the script so it will no longer run (Exit). “Compile Script” will automatically convert the script to a *.exe file. It can be exited in the same fashion from the system tray. “Edit Script” opens the notepad file and allows the script to be edited. Note that just double clicking like normal to open the file actually has the same effect of “Run Script.” This is one of the other results of changing the file extension to *.ahk.      
    “Open” “Help” opens the AutoHotkey help documents which can be a great help in finding the correct syntax. “Window Spy” launches au3_spy.exe. See the "Sending Mouse Clicks" subsection for an explanation of its purpose. “Reload This Script” recompiles the script. If any changes were made, they will now be active. “Edit This Script” opens the notepad file and allows the script to be edited in whichever editor you assigned as default for the *.ahk extension. “Suspend Hotkeys” will keep the script active but disable any hotkeys mapped within the script. Useful if the key combination you assigned is actually used in some other program. The H tray icon will be replaced with a similar looking icon, but with an S. “Pause Script” prevents any part of the script from running until it is manually resumed. The tray icon will be replaced with a red one. “Compile Script” will automatically convert the script to a *.exe file. It can be exited in the same fashion from the system tray. “Exit” completely closes and ends the AutoHotkey process.  
     
     Examples 
    There is simply an immense amount of things one can do with AutoHotkey scripts. However, the things outlined above should be enough to complete most of your scripts for SC4 modding (they’re all I’ve used so far).
    To make your own, identify something repetitive that you do that can be easily scripted. The two examples below detail my method of solving these problems. As with coding, a multitude of approaches exist, and the only incorrect one is the one that does not work (or perhaps takes an inordinate amount of time).
     
    LeProp_SaveClose.ahk
    For those that do not know, LeProp has a peculiar bug where it can only save one action at a time. As such, one needs to close and reopen to edit multiple things on a lot. It can be quite tedious having to save, close, navigate to, and run the LeProp executable. This script is designed to fix that.
    !x:: Click 380,590 ; Click Apply Click 550,120  ; Click Save WinWaitActive, LEProp ; Wait for “Save Successful!” dialogue box Send {Enter} ; Closes “Save Successful!” dialogue box WinWaitActive, iLive ; Waits for main window to be active (“Save Successful!” dialogue box is fully closed) Send {Esc} ; Close LeProp run, C:\Program Files (x86)\iLives\LEProp.exe ; Opens LeProp WinWaitActive, Ilive ; Waits for main window to be active Send {Enter} ; Opens the “Open File” window
     
    Reader_Add_BuildingPropFamily.ahk
    #a::     ; Hit Windows-a to activate Click right 1200, 600        ; Right click in the right pane Send {Down} {Down} {Down} {Down} {Enter}  ; Select “Add Property” WinWaitActive, Property :             ; Wait for Property editor to appear Click 425, 50      ; Click to expand the Name menu Send buil ; Type to scroll list to Building/prop Family Click 250, 105     ; Select Building/prop Family Click 450, 255     ; Select Add Click 40, 635      ; Click in the Values as text field Click 40, 635      ; Not sure why I have this twice Send 0x5f85e126    ; Your prop family IID goes here Click 435, 635     ; Hit first Apply Click 190, 700     ; Hit Second Apply WinWaitActive, Reader  ; Change to Reader main window name; partial name is acceptable Click 1200, 235   ; Click on Building/prop family property Send ^c ; Copies that property to the clipboard Click 870, 1000   ; Click to place focus in the left pane Send {Down}       ; Move down to select next exemplar   Loop, 257     ; Change to number of exemplars starting count at 0: e.g. if last num is 65, use 66 { Click 1200, 600   ; Click to place focus in the right pane Send ^v            ; Paste the property Click 870, 1000   ; Click to place focus in the left pane Send {Down}       ; Move down to select next exemplar }                  ; Repeat
     
     
     Conclusion 
      If anyone has questions or needs help on their scripts, I will be happy to help. If I don't start a thread, just shoot me a PM and we can work out your problems together. Happy modding! ...
  5. _Michael liked an article by nos.17, AutoHotkey as a Modding Tool   
    For those who are not familiar with it, Autohotkey is a fantastic open source program designed to replicate repetitive keyboard or mouse actions. As with any sort of coding, the possibilities are technically limitless, but so far I have used small script (about 20 lines) to save and open new exemplars in LeProp, and add/remove properties dozens of props in the Reader. What would have taken probably 20-30 minutes, one is able to achieve in under 5 seconds!
    As I said above, the possibilities are limitless, so I will make this tutorial as general as possible while showing examples of scripts I have created.
    This tutorial will be continuously updated as suggestions for inclusions are offered.
     
     
     Introduction 
    This tutorial is aimed towards any custom content creator who regularly, or semi-regularly has to perform repetitive tasks in the Reader or any other application. Simple text scripts can be used to quickly and easily automate such tasks. Skills learned can also be applied to any program or procedure outside of Sc4 also.
    This tutorial is worded simply so those with zero programming experience can complete their first script. This tutorial only covers a few of the basics. There are hundreds of more advanced functions for more experienced users. The AutoHotkey Help file is a great resource for this.
     
     
     Getting Started 
    Download AutoHotkey here. You will notice that there is no interface to start up and code into. This is because everything is done through simple text files.
    The first step is to identify a procedure you would like to automate, for example, adding Prop Family properties for a collection of 80 props. You will need to know exactly what you are doing for the task at hand. As you go through the process manually for the first few times, make careful notes of when and where you click, what you type in, etc. It may be helpful to write a procedure down on paper as you go.
    The second step is to create a new *.txt file that will be used for the script. It is not important at all what it is named or where it is placed. As long as its file extension is changed to *.ahk at some point, it will become associated with Autohotkey and everything will work fine.
     
     
     Sending Key Presses 
    The most basic command is the Send command. Typing
    Send asdf will, upon execution of the script, will type out asdf automatically. Not very useful you say? Yes, you’re right.
    Some special keys can be activated by enclosing their name in braces { }. Be careful here. Typing
    Send Enter will literally type out Enter as text: that is, the letter “E” followed by “n,” “t,” “e,” “r.” This does NOT have the same effect as pressing the enter button (obviously, typing “Enter” into Word will not put the cursor on a new line – the same concept applies to scripts). To simulate pressing the Enter button,
    Send {Enter} should be used instead. Other examples include {Shift}, {Delete}, {Tab}, etc.; for the arrow keys, {Up}, {Down}, {Left}, {Right} are the appropriate commands. Any of the other special keys are called using special characters instead:
    !  .......... Alt
    #.......... Windows
    +.......... Shift
    & ......... Used to combine two keys to a single new one (eg. f&g = hold “f” and press “g”)
    ^ ......... Ctrl
    < , > .... If there are a pair of keys, <! Signifies Left Alt and >! Signifies Right Alt; ! would trigger when any Alt is pressed, for example.
    From this, we can refine our script a little more:
    !u:: Send asdf Will type “asdf” when Alt and the 'u' key is pressed. A little more useful, don’t you think? Note the double colon after the statement. This demarks the start of the code that will be executed when those buttons are pressed. Adding a
    return demarks the end of the code for that hotkey. For simple scripts, it is not strictly needed, but for good practice, we will amend the code to include it anyways:
    !u:: Send asdf return  
     
     Sending Mouse Clicks 
    Every page can technically be operated without a mouse, but using 50 Tabs or Shift-Tabs to advance focus to the button you are looking for is inefficient, time-consuming, and dumb. There are numerous ways to do this; by far the simplest method is to use mouse clicks. The syntax
    Click xx, yy or, for a right click,
    Click right xx, yy simulates a left or right click at xx and yy, where xx and yy are the x and y coordinates of the button on the window you are using. Figuring out these coordinates will probably be the most time-consuming part. Fortunately, there is a tool which comes packaged with AHK that makes this process simple. Navigate to the AHK installation folder and run au3_spy.exe (or type it in the start menu).
    Among other things, the program will give you a live readout of the x and y coordinates of your mouse pointer for the current window and your overall screen. USE THE COORDINATES FOR THE CURRENT WINDOW. The “On Screen” coordinates are marked “less often used,” which is apt. You want to use the mouse position in the active window for numerous reasons, the largest being that if you drag the window around your screen, the Active Window coordinates will remain constant while the Screen coordinates will change.

     
    This is where careful notes come in handy. Going through the process manually with au3_spy open in the background, recording somewhere the x and y coordinates of any buttons needed in your task. For example, we could write a script that (in notepad) will paste something from the clipboard with minimal effort:
    !u:: Click right Send {Down}{Down}{Down}{Down}{Enter} return NOTE: In the example above, it is possible to use a mouse click to press the paste button instead of pressing Down 4x and enter, however, this method will be dependent on coordinates of the initial right click. Thus, many times it may be easier to chain arrow key commands instead of locating mouse positions.
     
    To transition to the next topic, suppose we have the following code:
    #s:: Click right Send {Down}{Down}{Down}{Enter}{Enter} return Which, when run on my internet browser (Chrome) will right click where the cursor is, open the save dialog box, and hit “Enter” to finalize the save. Run it, and you will notice that it does not entirely do what we want it to do. It will open the save dialog box, but the second enter (to finalize the save) does not seem to execute.
    This is a simple error in timing. When the script executes, all of the commands are sent instantaneously. This is the ideal condition; in real life, however, it takes some amount of time to do everything. Even a time of fractions of a millisecond is enough to throw your code off. If you manually right click and hit save, there will indeed be a small delay until the dialog box appears. Syncing everything may seem like a difficult fix, but the code required is quite simple.
     
     
     Opening New Windows 
    AHK sends its commands very quickly (as it is supposed to do). If click on any buttons that activate new windows or dialog boxes, you may run into problems. As mentioned above, the script will execute correctly, but not as intended; rather, it will send some (or all) of the commands in the time it takes for the message box to appear and become active. The solution is to wait until the new window is active and ready for input. Simply use the command
    Winwait, xxxxxx where xxxxxx is the full or partial title of the window. It is important to note that this string can either be the full exact title or just the first few characters. For example, if I am editing a file called nos.17_VehiculosFamilias_1c90deg.dat, I could type
    Winwait, nos.17 Using just “nos.17” is enough for the script to recognize which window it is waiting on.
    If the title is not explicitly stated in the window like it is below,

    Windows Task Manager can give you the appropriate name.

    Remember, only the first part of a window name is required. If the name is long or complex, the first few letters should suffice.
     
     
     
     Loops 
    To repeat tasks multiple times, one could either copy and paste the commands the necessary number of times, or use loops. Loops, if you are not familiar with them, will simply repeat the tasks within the braces { } a specified number of times for example,
    Loop, 4 { Send ^v Send {Enter} } would paste whatever is in the clipboard five times on a new line (another description). For obvious reasons, this method is preferred for larger numbers but is also easier to read and debug for small numbers (like 4) too. NOTE: The number in the loop control starts at 0. So if you want something to happen 4 times you will need to enter 3 (0 1 2 3), and so on. The general equation for the number of times you want to loop: n-1. If you’re interested why, (1) and (2); if not, just try and remember that.
     
     
     
     Comments 
    Comments are used for your convenience. Comments are bodies of text that the computer skips over and will not execute - their purpose is to either explain what should happen when some code executes or anything else the programmer wants to say. As such, they are never required but always recommended. In AutoHotkey, everything after a semicolon (;) on the same line will not parse (they will be completely ignored by the computer). An example:
    Click 380,590 ; Click Apply Everything after the semicolon ( Click Apply) will be ignored by the computer. It is only for my benefit to remember what each line is supposed to do. Comments in no way are required on every line. I've merely included them for sake of clarity so others can read my code.
     
     
     
     Saving and Running the Script 
    Whenever you are finished. Simply save your notepad document. If you haven’t already, change the extension from *.txt to *.ahk. Windows might give you a warning telling you that changing the extension may make the file unstable – this is generally a good warning but not applicable here and can be ignored. Changing *.txt to *.ahk will in no way change anything in the file – it will simply associate that file as an AutoHotkey script instead of a lowly text file.
    Once the file is renamed, right click on it and you should see some additional options in the menu.

    “Run Script” will make the script become active. Hit whatever hotkey(s) you assigned, and your script will execute every time you press the key(s). You will see an icon appear in your system tray. Right clicking there will allow you to do a few different things, including closing the script so it will no longer run (Exit). “Compile Script” will automatically convert the script to a *.exe file. It can be exited in the same fashion from the system tray. “Edit Script” opens the notepad file and allows the script to be edited. Note that just double clicking like normal to open the file actually has the same effect of “Run Script.” This is one of the other results of changing the file extension to *.ahk.      
    “Open” “Help” opens the AutoHotkey help documents which can be a great help in finding the correct syntax. “Window Spy” launches au3_spy.exe. See the "Sending Mouse Clicks" subsection for an explanation of its purpose. “Reload This Script” recompiles the script. If any changes were made, they will now be active. “Edit This Script” opens the notepad file and allows the script to be edited in whichever editor you assigned as default for the *.ahk extension. “Suspend Hotkeys” will keep the script active but disable any hotkeys mapped within the script. Useful if the key combination you assigned is actually used in some other program. The H tray icon will be replaced with a similar looking icon, but with an S. “Pause Script” prevents any part of the script from running until it is manually resumed. The tray icon will be replaced with a red one. “Compile Script” will automatically convert the script to a *.exe file. It can be exited in the same fashion from the system tray. “Exit” completely closes and ends the AutoHotkey process.  
     
     Examples 
    There is simply an immense amount of things one can do with AutoHotkey scripts. However, the things outlined above should be enough to complete most of your scripts for SC4 modding (they’re all I’ve used so far).
    To make your own, identify something repetitive that you do that can be easily scripted. The two examples below detail my method of solving these problems. As with coding, a multitude of approaches exist, and the only incorrect one is the one that does not work (or perhaps takes an inordinate amount of time).
     
    LeProp_SaveClose.ahk
    For those that do not know, LeProp has a peculiar bug where it can only save one action at a time. As such, one needs to close and reopen to edit multiple things on a lot. It can be quite tedious having to save, close, navigate to, and run the LeProp executable. This script is designed to fix that.
    !x:: Click 380,590 ; Click Apply Click 550,120  ; Click Save WinWaitActive, LEProp ; Wait for “Save Successful!” dialogue box Send {Enter} ; Closes “Save Successful!” dialogue box WinWaitActive, iLive ; Waits for main window to be active (“Save Successful!” dialogue box is fully closed) Send {Esc} ; Close LeProp run, C:\Program Files (x86)\iLives\LEProp.exe ; Opens LeProp WinWaitActive, Ilive ; Waits for main window to be active Send {Enter} ; Opens the “Open File” window
     
    Reader_Add_BuildingPropFamily.ahk
    #a::     ; Hit Windows-a to activate Click right 1200, 600        ; Right click in the right pane Send {Down} {Down} {Down} {Down} {Enter}  ; Select “Add Property” WinWaitActive, Property :             ; Wait for Property editor to appear Click 425, 50      ; Click to expand the Name menu Send buil ; Type to scroll list to Building/prop Family Click 250, 105     ; Select Building/prop Family Click 450, 255     ; Select Add Click 40, 635      ; Click in the Values as text field Click 40, 635      ; Not sure why I have this twice Send 0x5f85e126    ; Your prop family IID goes here Click 435, 635     ; Hit first Apply Click 190, 700     ; Hit Second Apply WinWaitActive, Reader  ; Change to Reader main window name; partial name is acceptable Click 1200, 235   ; Click on Building/prop family property Send ^c ; Copies that property to the clipboard Click 870, 1000   ; Click to place focus in the left pane Send {Down}       ; Move down to select next exemplar   Loop, 257     ; Change to number of exemplars starting count at 0: e.g. if last num is 65, use 66 { Click 1200, 600   ; Click to place focus in the right pane Send ^v            ; Paste the property Click 870, 1000   ; Click to place focus in the left pane Send {Down}       ; Move down to select next exemplar }                  ; Repeat
     
     
     Conclusion 
      If anyone has questions or needs help on their scripts, I will be happy to help. If I don't start a thread, just shoot me a PM and we can work out your problems together. Happy modding! ...
  6. _Michael liked an article by nos.17, AutoHotkey as a Modding Tool   
    For those who are not familiar with it, Autohotkey is a fantastic open source program designed to replicate repetitive keyboard or mouse actions. As with any sort of coding, the possibilities are technically limitless, but so far I have used small script (about 20 lines) to save and open new exemplars in LeProp, and add/remove properties dozens of props in the Reader. What would have taken probably 20-30 minutes, one is able to achieve in under 5 seconds!
    As I said above, the possibilities are limitless, so I will make this tutorial as general as possible while showing examples of scripts I have created.
    This tutorial will be continuously updated as suggestions for inclusions are offered.
     
     
     Introduction 
    This tutorial is aimed towards any custom content creator who regularly, or semi-regularly has to perform repetitive tasks in the Reader or any other application. Simple text scripts can be used to quickly and easily automate such tasks. Skills learned can also be applied to any program or procedure outside of Sc4 also.
    This tutorial is worded simply so those with zero programming experience can complete their first script. This tutorial only covers a few of the basics. There are hundreds of more advanced functions for more experienced users. The AutoHotkey Help file is a great resource for this.
     
     
     Getting Started 
    Download AutoHotkey here. You will notice that there is no interface to start up and code into. This is because everything is done through simple text files.
    The first step is to identify a procedure you would like to automate, for example, adding Prop Family properties for a collection of 80 props. You will need to know exactly what you are doing for the task at hand. As you go through the process manually for the first few times, make careful notes of when and where you click, what you type in, etc. It may be helpful to write a procedure down on paper as you go.
    The second step is to create a new *.txt file that will be used for the script. It is not important at all what it is named or where it is placed. As long as its file extension is changed to *.ahk at some point, it will become associated with Autohotkey and everything will work fine.
     
     
     Sending Key Presses 
    The most basic command is the Send command. Typing
    Send asdf will, upon execution of the script, will type out asdf automatically. Not very useful you say? Yes, you’re right.
    Some special keys can be activated by enclosing their name in braces { }. Be careful here. Typing
    Send Enter will literally type out Enter as text: that is, the letter “E” followed by “n,” “t,” “e,” “r.” This does NOT have the same effect as pressing the enter button (obviously, typing “Enter” into Word will not put the cursor on a new line – the same concept applies to scripts). To simulate pressing the Enter button,
    Send {Enter} should be used instead. Other examples include {Shift}, {Delete}, {Tab}, etc.; for the arrow keys, {Up}, {Down}, {Left}, {Right} are the appropriate commands. Any of the other special keys are called using special characters instead:
    !  .......... Alt
    #.......... Windows
    +.......... Shift
    & ......... Used to combine two keys to a single new one (eg. f&g = hold “f” and press “g”)
    ^ ......... Ctrl
    < , > .... If there are a pair of keys, <! Signifies Left Alt and >! Signifies Right Alt; ! would trigger when any Alt is pressed, for example.
    From this, we can refine our script a little more:
    !u:: Send asdf Will type “asdf” when Alt and the 'u' key is pressed. A little more useful, don’t you think? Note the double colon after the statement. This demarks the start of the code that will be executed when those buttons are pressed. Adding a
    return demarks the end of the code for that hotkey. For simple scripts, it is not strictly needed, but for good practice, we will amend the code to include it anyways:
    !u:: Send asdf return  
     
     Sending Mouse Clicks 
    Every page can technically be operated without a mouse, but using 50 Tabs or Shift-Tabs to advance focus to the button you are looking for is inefficient, time-consuming, and dumb. There are numerous ways to do this; by far the simplest method is to use mouse clicks. The syntax
    Click xx, yy or, for a right click,
    Click right xx, yy simulates a left or right click at xx and yy, where xx and yy are the x and y coordinates of the button on the window you are using. Figuring out these coordinates will probably be the most time-consuming part. Fortunately, there is a tool which comes packaged with AHK that makes this process simple. Navigate to the AHK installation folder and run au3_spy.exe (or type it in the start menu).
    Among other things, the program will give you a live readout of the x and y coordinates of your mouse pointer for the current window and your overall screen. USE THE COORDINATES FOR THE CURRENT WINDOW. The “On Screen” coordinates are marked “less often used,” which is apt. You want to use the mouse position in the active window for numerous reasons, the largest being that if you drag the window around your screen, the Active Window coordinates will remain constant while the Screen coordinates will change.

     
    This is where careful notes come in handy. Going through the process manually with au3_spy open in the background, recording somewhere the x and y coordinates of any buttons needed in your task. For example, we could write a script that (in notepad) will paste something from the clipboard with minimal effort:
    !u:: Click right Send {Down}{Down}{Down}{Down}{Enter} return NOTE: In the example above, it is possible to use a mouse click to press the paste button instead of pressing Down 4x and enter, however, this method will be dependent on coordinates of the initial right click. Thus, many times it may be easier to chain arrow key commands instead of locating mouse positions.
     
    To transition to the next topic, suppose we have the following code:
    #s:: Click right Send {Down}{Down}{Down}{Enter}{Enter} return Which, when run on my internet browser (Chrome) will right click where the cursor is, open the save dialog box, and hit “Enter” to finalize the save. Run it, and you will notice that it does not entirely do what we want it to do. It will open the save dialog box, but the second enter (to finalize the save) does not seem to execute.
    This is a simple error in timing. When the script executes, all of the commands are sent instantaneously. This is the ideal condition; in real life, however, it takes some amount of time to do everything. Even a time of fractions of a millisecond is enough to throw your code off. If you manually right click and hit save, there will indeed be a small delay until the dialog box appears. Syncing everything may seem like a difficult fix, but the code required is quite simple.
     
     
     Opening New Windows 
    AHK sends its commands very quickly (as it is supposed to do). If click on any buttons that activate new windows or dialog boxes, you may run into problems. As mentioned above, the script will execute correctly, but not as intended; rather, it will send some (or all) of the commands in the time it takes for the message box to appear and become active. The solution is to wait until the new window is active and ready for input. Simply use the command
    Winwait, xxxxxx where xxxxxx is the full or partial title of the window. It is important to note that this string can either be the full exact title or just the first few characters. For example, if I am editing a file called nos.17_VehiculosFamilias_1c90deg.dat, I could type
    Winwait, nos.17 Using just “nos.17” is enough for the script to recognize which window it is waiting on.
    If the title is not explicitly stated in the window like it is below,

    Windows Task Manager can give you the appropriate name.

    Remember, only the first part of a window name is required. If the name is long or complex, the first few letters should suffice.
     
     
     
     Loops 
    To repeat tasks multiple times, one could either copy and paste the commands the necessary number of times, or use loops. Loops, if you are not familiar with them, will simply repeat the tasks within the braces { } a specified number of times for example,
    Loop, 4 { Send ^v Send {Enter} } would paste whatever is in the clipboard five times on a new line (another description). For obvious reasons, this method is preferred for larger numbers but is also easier to read and debug for small numbers (like 4) too. NOTE: The number in the loop control starts at 0. So if you want something to happen 4 times you will need to enter 3 (0 1 2 3), and so on. The general equation for the number of times you want to loop: n-1. If you’re interested why, (1) and (2); if not, just try and remember that.
     
     
     
     Comments 
    Comments are used for your convenience. Comments are bodies of text that the computer skips over and will not execute - their purpose is to either explain what should happen when some code executes or anything else the programmer wants to say. As such, they are never required but always recommended. In AutoHotkey, everything after a semicolon (;) on the same line will not parse (they will be completely ignored by the computer). An example:
    Click 380,590 ; Click Apply Everything after the semicolon ( Click Apply) will be ignored by the computer. It is only for my benefit to remember what each line is supposed to do. Comments in no way are required on every line. I've merely included them for sake of clarity so others can read my code.
     
     
     
     Saving and Running the Script 
    Whenever you are finished. Simply save your notepad document. If you haven’t already, change the extension from *.txt to *.ahk. Windows might give you a warning telling you that changing the extension may make the file unstable – this is generally a good warning but not applicable here and can be ignored. Changing *.txt to *.ahk will in no way change anything in the file – it will simply associate that file as an AutoHotkey script instead of a lowly text file.
    Once the file is renamed, right click on it and you should see some additional options in the menu.

    “Run Script” will make the script become active. Hit whatever hotkey(s) you assigned, and your script will execute every time you press the key(s). You will see an icon appear in your system tray. Right clicking there will allow you to do a few different things, including closing the script so it will no longer run (Exit). “Compile Script” will automatically convert the script to a *.exe file. It can be exited in the same fashion from the system tray. “Edit Script” opens the notepad file and allows the script to be edited. Note that just double clicking like normal to open the file actually has the same effect of “Run Script.” This is one of the other results of changing the file extension to *.ahk.      
    “Open” “Help” opens the AutoHotkey help documents which can be a great help in finding the correct syntax. “Window Spy” launches au3_spy.exe. See the "Sending Mouse Clicks" subsection for an explanation of its purpose. “Reload This Script” recompiles the script. If any changes were made, they will now be active. “Edit This Script” opens the notepad file and allows the script to be edited in whichever editor you assigned as default for the *.ahk extension. “Suspend Hotkeys” will keep the script active but disable any hotkeys mapped within the script. Useful if the key combination you assigned is actually used in some other program. The H tray icon will be replaced with a similar looking icon, but with an S. “Pause Script” prevents any part of the script from running until it is manually resumed. The tray icon will be replaced with a red one. “Compile Script” will automatically convert the script to a *.exe file. It can be exited in the same fashion from the system tray. “Exit” completely closes and ends the AutoHotkey process.  
     
     Examples 
    There is simply an immense amount of things one can do with AutoHotkey scripts. However, the things outlined above should be enough to complete most of your scripts for SC4 modding (they’re all I’ve used so far).
    To make your own, identify something repetitive that you do that can be easily scripted. The two examples below detail my method of solving these problems. As with coding, a multitude of approaches exist, and the only incorrect one is the one that does not work (or perhaps takes an inordinate amount of time).
     
    LeProp_SaveClose.ahk
    For those that do not know, LeProp has a peculiar bug where it can only save one action at a time. As such, one needs to close and reopen to edit multiple things on a lot. It can be quite tedious having to save, close, navigate to, and run the LeProp executable. This script is designed to fix that.
    !x:: Click 380,590 ; Click Apply Click 550,120  ; Click Save WinWaitActive, LEProp ; Wait for “Save Successful!” dialogue box Send {Enter} ; Closes “Save Successful!” dialogue box WinWaitActive, iLive ; Waits for main window to be active (“Save Successful!” dialogue box is fully closed) Send {Esc} ; Close LeProp run, C:\Program Files (x86)\iLives\LEProp.exe ; Opens LeProp WinWaitActive, Ilive ; Waits for main window to be active Send {Enter} ; Opens the “Open File” window
     
    Reader_Add_BuildingPropFamily.ahk
    #a::     ; Hit Windows-a to activate Click right 1200, 600        ; Right click in the right pane Send {Down} {Down} {Down} {Down} {Enter}  ; Select “Add Property” WinWaitActive, Property :             ; Wait for Property editor to appear Click 425, 50      ; Click to expand the Name menu Send buil ; Type to scroll list to Building/prop Family Click 250, 105     ; Select Building/prop Family Click 450, 255     ; Select Add Click 40, 635      ; Click in the Values as text field Click 40, 635      ; Not sure why I have this twice Send 0x5f85e126    ; Your prop family IID goes here Click 435, 635     ; Hit first Apply Click 190, 700     ; Hit Second Apply WinWaitActive, Reader  ; Change to Reader main window name; partial name is acceptable Click 1200, 235   ; Click on Building/prop family property Send ^c ; Copies that property to the clipboard Click 870, 1000   ; Click to place focus in the left pane Send {Down}       ; Move down to select next exemplar   Loop, 257     ; Change to number of exemplars starting count at 0: e.g. if last num is 65, use 66 { Click 1200, 600   ; Click to place focus in the right pane Send ^v            ; Paste the property Click 870, 1000   ; Click to place focus in the left pane Send {Down}       ; Move down to select next exemplar }                  ; Repeat
     
     
     Conclusion 
      If anyone has questions or needs help on their scripts, I will be happy to help. If I don't start a thread, just shoot me a PM and we can work out your problems together. Happy modding! ...
  7. _Michael liked an article by nos.17, AutoHotkey as a Modding Tool   
    For those who are not familiar with it, Autohotkey is a fantastic open source program designed to replicate repetitive keyboard or mouse actions. As with any sort of coding, the possibilities are technically limitless, but so far I have used small script (about 20 lines) to save and open new exemplars in LeProp, and add/remove properties dozens of props in the Reader. What would have taken probably 20-30 minutes, one is able to achieve in under 5 seconds!
    As I said above, the possibilities are limitless, so I will make this tutorial as general as possible while showing examples of scripts I have created.
    This tutorial will be continuously updated as suggestions for inclusions are offered.
     
     
     Introduction 
    This tutorial is aimed towards any custom content creator who regularly, or semi-regularly has to perform repetitive tasks in the Reader or any other application. Simple text scripts can be used to quickly and easily automate such tasks. Skills learned can also be applied to any program or procedure outside of Sc4 also.
    This tutorial is worded simply so those with zero programming experience can complete their first script. This tutorial only covers a few of the basics. There are hundreds of more advanced functions for more experienced users. The AutoHotkey Help file is a great resource for this.
     
     
     Getting Started 
    Download AutoHotkey here. You will notice that there is no interface to start up and code into. This is because everything is done through simple text files.
    The first step is to identify a procedure you would like to automate, for example, adding Prop Family properties for a collection of 80 props. You will need to know exactly what you are doing for the task at hand. As you go through the process manually for the first few times, make careful notes of when and where you click, what you type in, etc. It may be helpful to write a procedure down on paper as you go.
    The second step is to create a new *.txt file that will be used for the script. It is not important at all what it is named or where it is placed. As long as its file extension is changed to *.ahk at some point, it will become associated with Autohotkey and everything will work fine.
     
     
     Sending Key Presses 
    The most basic command is the Send command. Typing
    Send asdf will, upon execution of the script, will type out asdf automatically. Not very useful you say? Yes, you’re right.
    Some special keys can be activated by enclosing their name in braces { }. Be careful here. Typing
    Send Enter will literally type out Enter as text: that is, the letter “E” followed by “n,” “t,” “e,” “r.” This does NOT have the same effect as pressing the enter button (obviously, typing “Enter” into Word will not put the cursor on a new line – the same concept applies to scripts). To simulate pressing the Enter button,
    Send {Enter} should be used instead. Other examples include {Shift}, {Delete}, {Tab}, etc.; for the arrow keys, {Up}, {Down}, {Left}, {Right} are the appropriate commands. Any of the other special keys are called using special characters instead:
    !  .......... Alt
    #.......... Windows
    +.......... Shift
    & ......... Used to combine two keys to a single new one (eg. f&g = hold “f” and press “g”)
    ^ ......... Ctrl
    < , > .... If there are a pair of keys, <! Signifies Left Alt and >! Signifies Right Alt; ! would trigger when any Alt is pressed, for example.
    From this, we can refine our script a little more:
    !u:: Send asdf Will type “asdf” when Alt and the 'u' key is pressed. A little more useful, don’t you think? Note the double colon after the statement. This demarks the start of the code that will be executed when those buttons are pressed. Adding a
    return demarks the end of the code for that hotkey. For simple scripts, it is not strictly needed, but for good practice, we will amend the code to include it anyways:
    !u:: Send asdf return  
     
     Sending Mouse Clicks 
    Every page can technically be operated without a mouse, but using 50 Tabs or Shift-Tabs to advance focus to the button you are looking for is inefficient, time-consuming, and dumb. There are numerous ways to do this; by far the simplest method is to use mouse clicks. The syntax
    Click xx, yy or, for a right click,
    Click right xx, yy simulates a left or right click at xx and yy, where xx and yy are the x and y coordinates of the button on the window you are using. Figuring out these coordinates will probably be the most time-consuming part. Fortunately, there is a tool which comes packaged with AHK that makes this process simple. Navigate to the AHK installation folder and run au3_spy.exe (or type it in the start menu).
    Among other things, the program will give you a live readout of the x and y coordinates of your mouse pointer for the current window and your overall screen. USE THE COORDINATES FOR THE CURRENT WINDOW. The “On Screen” coordinates are marked “less often used,” which is apt. You want to use the mouse position in the active window for numerous reasons, the largest being that if you drag the window around your screen, the Active Window coordinates will remain constant while the Screen coordinates will change.

     
    This is where careful notes come in handy. Going through the process manually with au3_spy open in the background, recording somewhere the x and y coordinates of any buttons needed in your task. For example, we could write a script that (in notepad) will paste something from the clipboard with minimal effort:
    !u:: Click right Send {Down}{Down}{Down}{Down}{Enter} return NOTE: In the example above, it is possible to use a mouse click to press the paste button instead of pressing Down 4x and enter, however, this method will be dependent on coordinates of the initial right click. Thus, many times it may be easier to chain arrow key commands instead of locating mouse positions.
     
    To transition to the next topic, suppose we have the following code:
    #s:: Click right Send {Down}{Down}{Down}{Enter}{Enter} return Which, when run on my internet browser (Chrome) will right click where the cursor is, open the save dialog box, and hit “Enter” to finalize the save. Run it, and you will notice that it does not entirely do what we want it to do. It will open the save dialog box, but the second enter (to finalize the save) does not seem to execute.
    This is a simple error in timing. When the script executes, all of the commands are sent instantaneously. This is the ideal condition; in real life, however, it takes some amount of time to do everything. Even a time of fractions of a millisecond is enough to throw your code off. If you manually right click and hit save, there will indeed be a small delay until the dialog box appears. Syncing everything may seem like a difficult fix, but the code required is quite simple.
     
     
     Opening New Windows 
    AHK sends its commands very quickly (as it is supposed to do). If click on any buttons that activate new windows or dialog boxes, you may run into problems. As mentioned above, the script will execute correctly, but not as intended; rather, it will send some (or all) of the commands in the time it takes for the message box to appear and become active. The solution is to wait until the new window is active and ready for input. Simply use the command
    Winwait, xxxxxx where xxxxxx is the full or partial title of the window. It is important to note that this string can either be the full exact title or just the first few characters. For example, if I am editing a file called nos.17_VehiculosFamilias_1c90deg.dat, I could type
    Winwait, nos.17 Using just “nos.17” is enough for the script to recognize which window it is waiting on.
    If the title is not explicitly stated in the window like it is below,

    Windows Task Manager can give you the appropriate name.

    Remember, only the first part of a window name is required. If the name is long or complex, the first few letters should suffice.
     
     
     
     Loops 
    To repeat tasks multiple times, one could either copy and paste the commands the necessary number of times, or use loops. Loops, if you are not familiar with them, will simply repeat the tasks within the braces { } a specified number of times for example,
    Loop, 4 { Send ^v Send {Enter} } would paste whatever is in the clipboard five times on a new line (another description). For obvious reasons, this method is preferred for larger numbers but is also easier to read and debug for small numbers (like 4) too. NOTE: The number in the loop control starts at 0. So if you want something to happen 4 times you will need to enter 3 (0 1 2 3), and so on. The general equation for the number of times you want to loop: n-1. If you’re interested why, (1) and (2); if not, just try and remember that.
     
     
     
     Comments 
    Comments are used for your convenience. Comments are bodies of text that the computer skips over and will not execute - their purpose is to either explain what should happen when some code executes or anything else the programmer wants to say. As such, they are never required but always recommended. In AutoHotkey, everything after a semicolon (;) on the same line will not parse (they will be completely ignored by the computer). An example:
    Click 380,590 ; Click Apply Everything after the semicolon ( Click Apply) will be ignored by the computer. It is only for my benefit to remember what each line is supposed to do. Comments in no way are required on every line. I've merely included them for sake of clarity so others can read my code.
     
     
     
     Saving and Running the Script 
    Whenever you are finished. Simply save your notepad document. If you haven’t already, change the extension from *.txt to *.ahk. Windows might give you a warning telling you that changing the extension may make the file unstable – this is generally a good warning but not applicable here and can be ignored. Changing *.txt to *.ahk will in no way change anything in the file – it will simply associate that file as an AutoHotkey script instead of a lowly text file.
    Once the file is renamed, right click on it and you should see some additional options in the menu.

    “Run Script” will make the script become active. Hit whatever hotkey(s) you assigned, and your script will execute every time you press the key(s). You will see an icon appear in your system tray. Right clicking there will allow you to do a few different things, including closing the script so it will no longer run (Exit). “Compile Script” will automatically convert the script to a *.exe file. It can be exited in the same fashion from the system tray. “Edit Script” opens the notepad file and allows the script to be edited. Note that just double clicking like normal to open the file actually has the same effect of “Run Script.” This is one of the other results of changing the file extension to *.ahk.      
    “Open” “Help” opens the AutoHotkey help documents which can be a great help in finding the correct syntax. “Window Spy” launches au3_spy.exe. See the "Sending Mouse Clicks" subsection for an explanation of its purpose. “Reload This Script” recompiles the script. If any changes were made, they will now be active. “Edit This Script” opens the notepad file and allows the script to be edited in whichever editor you assigned as default for the *.ahk extension. “Suspend Hotkeys” will keep the script active but disable any hotkeys mapped within the script. Useful if the key combination you assigned is actually used in some other program. The H tray icon will be replaced with a similar looking icon, but with an S. “Pause Script” prevents any part of the script from running until it is manually resumed. The tray icon will be replaced with a red one. “Compile Script” will automatically convert the script to a *.exe file. It can be exited in the same fashion from the system tray. “Exit” completely closes and ends the AutoHotkey process.  
     
     Examples 
    There is simply an immense amount of things one can do with AutoHotkey scripts. However, the things outlined above should be enough to complete most of your scripts for SC4 modding (they’re all I’ve used so far).
    To make your own, identify something repetitive that you do that can be easily scripted. The two examples below detail my method of solving these problems. As with coding, a multitude of approaches exist, and the only incorrect one is the one that does not work (or perhaps takes an inordinate amount of time).
     
    LeProp_SaveClose.ahk
    For those that do not know, LeProp has a peculiar bug where it can only save one action at a time. As such, one needs to close and reopen to edit multiple things on a lot. It can be quite tedious having to save, close, navigate to, and run the LeProp executable. This script is designed to fix that.
    !x:: Click 380,590 ; Click Apply Click 550,120  ; Click Save WinWaitActive, LEProp ; Wait for “Save Successful!” dialogue box Send {Enter} ; Closes “Save Successful!” dialogue box WinWaitActive, iLive ; Waits for main window to be active (“Save Successful!” dialogue box is fully closed) Send {Esc} ; Close LeProp run, C:\Program Files (x86)\iLives\LEProp.exe ; Opens LeProp WinWaitActive, Ilive ; Waits for main window to be active Send {Enter} ; Opens the “Open File” window
     
    Reader_Add_BuildingPropFamily.ahk
    #a::     ; Hit Windows-a to activate Click right 1200, 600        ; Right click in the right pane Send {Down} {Down} {Down} {Down} {Enter}  ; Select “Add Property” WinWaitActive, Property :             ; Wait for Property editor to appear Click 425, 50      ; Click to expand the Name menu Send buil ; Type to scroll list to Building/prop Family Click 250, 105     ; Select Building/prop Family Click 450, 255     ; Select Add Click 40, 635      ; Click in the Values as text field Click 40, 635      ; Not sure why I have this twice Send 0x5f85e126    ; Your prop family IID goes here Click 435, 635     ; Hit first Apply Click 190, 700     ; Hit Second Apply WinWaitActive, Reader  ; Change to Reader main window name; partial name is acceptable Click 1200, 235   ; Click on Building/prop family property Send ^c ; Copies that property to the clipboard Click 870, 1000   ; Click to place focus in the left pane Send {Down}       ; Move down to select next exemplar   Loop, 257     ; Change to number of exemplars starting count at 0: e.g. if last num is 65, use 66 { Click 1200, 600   ; Click to place focus in the right pane Send ^v            ; Paste the property Click 870, 1000   ; Click to place focus in the left pane Send {Down}       ; Move down to select next exemplar }                  ; Repeat
     
     
     Conclusion 
      If anyone has questions or needs help on their scripts, I will be happy to help. If I don't start a thread, just shoot me a PM and we can work out your problems together. Happy modding! ...
  8. nos.17 liked an article by 11241036, How to make a visually pleasing slope   
    How to make a visually pleasing slope

    …exactly the way you want it, without the help of a slope mod.
    Yes, it‘s right. We’ll attempting the almost impossible: Creating a slope that looks good, exactly the way we want it, without resorting to a slope mod. The goal of this tutorial shall be: We will be (for demonstrational purposes) making an overpass with the height of 7.5m over a railway line, where the terrain rises exactly by 1.5m per city tile. (This requires making a slope that takes up 5 city tiles.)
    In this tutorial I will frequently use the term height increase per city tile. This mostly means what it implies: The height distance (im m) between the lowest point of a city tile that is not flat and its highest point.
    This tutorial is also supposed to be part of the "How to Do It" Simtropolis Challenge, Season 3. I hope posting it will suffice, if not, I'd appreciate if someone tells me.
    Let’s first start with a little thinking:
     
    1. Which possibilites do we have?
     
    We could manually raise the terrain with the terrain raising tool, either with the one that comes in the Mayor Mode Menu, or the one from the God Mode Menu. But, as you might have already thought, it seems to be impossible to make it look accurately right. We could also just simply use a slope mod. But however, you might definitely want a slope to feature a defined height increase, not just any, and perhaps no slope mod available is meeting your demands and you also might not want to leave Sim City 4, modify your slope mod, return, drag your traffic route, leave Sim City 4 and so on… Fortunately, there’s a third way to make slopes. This tutorial will be all about making a slope by resorting to this way.
     
    2. What do we need?
     
    The Network Addon Mod, which is available here. It comes with the only required tool, the Hole Digger and Raiser Lots. We will be using these lots. This tool unfortunately is a puzzle piece, which can trigger the bug that causes SC4 to return to desktop when hovering the mouse cursor over a transit-enabled lot. You might want to install this plugin that fixes this bug. Probably the Extra Cheats Plugin, which is available here. It isn’t really mandatory, but quite helpful, as it allows you to plan your slopes according to what you actually want. And, most important: The brain.exe, which is available in your head. Most importantly, you will need to use a bit of mathematics (for instance, if you want a road to take 5 tiles to climb a height difference of 7.5m, you need to calculate: 7.5m/5 = 1.5m), especially considering that with the tool we are using, you are unfortunately limited to height increases per tile of 0.5m, 1m, 1.5m and so on (it increases by increments of 0.5m). Also, please note that the Hole Digger and Raiser Lots destroy subterranean water pipes and subway tunnels – so, after using them, it is highly recommended to check your water pipes and subway tunnels, lest you end up disconnecting parts of your city from the local water supply (this happened to me once).
     
    3. The theoretical process
     
    This part is rather easy to explain: As you might have already noticed, you can use the Hole Digger and Raiser Lots to raise/lower a tile, as well as raise large parts of your terrain (for instance, to create terraces). The choice of how much you can raise/lower your terrain seems to be low, since the tool itself only offers the possibility to raise/lower the terrain by increments of:
    15m, 7.5m, 8m, 10m, 12m, 14m, 15.5m, 24m, and 30m
    You can actually increase your possibilities if you raise the terrain by a certain amount, then lower it by another amount. For example, raising it by 15m and lowering it by 14m eventually raises the terrain by 1m. And, most important for this tutorial: If you stagger those cleverly, you can create slopes.
     
    4. A practical example
     
    Perhaps a few pictures explain more than words. Let’s now focus on the goal topic of this tutorial, namely, the 7.5m overpass that we will be making exactly here:

    I’ve placed park lots to label the place where the slope will be in the future. Let’s now first grab the Raiser Tool and press TAB until we get the 15.5m raiser tool (15.5m-14m = 1.5m).

    Place it exactly here (red dot):

    This will create a mound with the height of 15.5m. Next, press SHIFT+TAB to return to the 14m tile and press END to switch to the digger piece (it should be glowing red instead of blue). Place the tool exactly on top of the mound and the result will look like this:

    Now, use road stubs to lengthen the raised terrain to the opposite side:

    I’ve marked the next spot where you should place the raiser tool again with a red dot. This will, basically, allow you to make slopes if you continue this pattern. You can, by the way, at least in this case speed up the process if you make a "wall" like this with only the raiser tool…

    …and then lower the terrain. All of this will eventuall lead to this result:

    Now, all that is left is creating a trench for the railway and then dragging the railway through it and placing the 7.5m Road overpass puzzle pieces. This is the result:

     
    5. Final words
    Looks complicated – and in fact, it is. It’s rather time-consuming, but it is the only way I’ve ever been able to figure out to make a slope exactly the way I want it. This is especially useful in making overpasses/underpasses – for instance, overpasses with not the same height increase per tile but gentle in the beginning, more steep in the center and gentle in the end, like it would be realistic (try to make this with a slope mod)…

    …and sometimes useful in making nice mountain roads like these:

     
    Especially for the latter purpose, you might want to install the Extra Cheats plugin, and use it by pressing CTRL+SHIFT+ALT+X and then typing in terrainquery to actually find out which height difference you have to deal with. That’s the point where you need to use your brain.exe: 1. To calculate how many city tiles it will take your slope to climb this difference, and 2. by how much meters you will have to raise every tile.
    That’s all for now. I hope you liked this tutorial.
  9. _Michael liked an article by nos.17, AutoHotkey as a Modding Tool   
    For those who are not familiar with it, Autohotkey is a fantastic open source program designed to replicate repetitive keyboard or mouse actions. As with any sort of coding, the possibilities are technically limitless, but so far I have used small script (about 20 lines) to save and open new exemplars in LeProp, and add/remove properties dozens of props in the Reader. What would have taken probably 20-30 minutes, one is able to achieve in under 5 seconds!
    As I said above, the possibilities are limitless, so I will make this tutorial as general as possible while showing examples of scripts I have created.
    This tutorial will be continuously updated as suggestions for inclusions are offered.
     
     
     Introduction 
    This tutorial is aimed towards any custom content creator who regularly, or semi-regularly has to perform repetitive tasks in the Reader or any other application. Simple text scripts can be used to quickly and easily automate such tasks. Skills learned can also be applied to any program or procedure outside of Sc4 also.
    This tutorial is worded simply so those with zero programming experience can complete their first script. This tutorial only covers a few of the basics. There are hundreds of more advanced functions for more experienced users. The AutoHotkey Help file is a great resource for this.
     
     
     Getting Started 
    Download AutoHotkey here. You will notice that there is no interface to start up and code into. This is because everything is done through simple text files.
    The first step is to identify a procedure you would like to automate, for example, adding Prop Family properties for a collection of 80 props. You will need to know exactly what you are doing for the task at hand. As you go through the process manually for the first few times, make careful notes of when and where you click, what you type in, etc. It may be helpful to write a procedure down on paper as you go.
    The second step is to create a new *.txt file that will be used for the script. It is not important at all what it is named or where it is placed. As long as its file extension is changed to *.ahk at some point, it will become associated with Autohotkey and everything will work fine.
     
     
     Sending Key Presses 
    The most basic command is the Send command. Typing
    Send asdf will, upon execution of the script, will type out asdf automatically. Not very useful you say? Yes, you’re right.
    Some special keys can be activated by enclosing their name in braces { }. Be careful here. Typing
    Send Enter will literally type out Enter as text: that is, the letter “E” followed by “n,” “t,” “e,” “r.” This does NOT have the same effect as pressing the enter button (obviously, typing “Enter” into Word will not put the cursor on a new line – the same concept applies to scripts). To simulate pressing the Enter button,
    Send {Enter} should be used instead. Other examples include {Shift}, {Delete}, {Tab}, etc.; for the arrow keys, {Up}, {Down}, {Left}, {Right} are the appropriate commands. Any of the other special keys are called using special characters instead:
    !  .......... Alt
    #.......... Windows
    +.......... Shift
    & ......... Used to combine two keys to a single new one (eg. f&g = hold “f” and press “g”)
    ^ ......... Ctrl
    < , > .... If there are a pair of keys, <! Signifies Left Alt and >! Signifies Right Alt; ! would trigger when any Alt is pressed, for example.
    From this, we can refine our script a little more:
    !u:: Send asdf Will type “asdf” when Alt and the 'u' key is pressed. A little more useful, don’t you think? Note the double colon after the statement. This demarks the start of the code that will be executed when those buttons are pressed. Adding a
    return demarks the end of the code for that hotkey. For simple scripts, it is not strictly needed, but for good practice, we will amend the code to include it anyways:
    !u:: Send asdf return  
     
     Sending Mouse Clicks 
    Every page can technically be operated without a mouse, but using 50 Tabs or Shift-Tabs to advance focus to the button you are looking for is inefficient, time-consuming, and dumb. There are numerous ways to do this; by far the simplest method is to use mouse clicks. The syntax
    Click xx, yy or, for a right click,
    Click right xx, yy simulates a left or right click at xx and yy, where xx and yy are the x and y coordinates of the button on the window you are using. Figuring out these coordinates will probably be the most time-consuming part. Fortunately, there is a tool which comes packaged with AHK that makes this process simple. Navigate to the AHK installation folder and run au3_spy.exe (or type it in the start menu).
    Among other things, the program will give you a live readout of the x and y coordinates of your mouse pointer for the current window and your overall screen. USE THE COORDINATES FOR THE CURRENT WINDOW. The “On Screen” coordinates are marked “less often used,” which is apt. You want to use the mouse position in the active window for numerous reasons, the largest being that if you drag the window around your screen, the Active Window coordinates will remain constant while the Screen coordinates will change.

     
    This is where careful notes come in handy. Going through the process manually with au3_spy open in the background, recording somewhere the x and y coordinates of any buttons needed in your task. For example, we could write a script that (in notepad) will paste something from the clipboard with minimal effort:
    !u:: Click right Send {Down}{Down}{Down}{Down}{Enter} return NOTE: In the example above, it is possible to use a mouse click to press the paste button instead of pressing Down 4x and enter, however, this method will be dependent on coordinates of the initial right click. Thus, many times it may be easier to chain arrow key commands instead of locating mouse positions.
     
    To transition to the next topic, suppose we have the following code:
    #s:: Click right Send {Down}{Down}{Down}{Enter}{Enter} return Which, when run on my internet browser (Chrome) will right click where the cursor is, open the save dialog box, and hit “Enter” to finalize the save. Run it, and you will notice that it does not entirely do what we want it to do. It will open the save dialog box, but the second enter (to finalize the save) does not seem to execute.
    This is a simple error in timing. When the script executes, all of the commands are sent instantaneously. This is the ideal condition; in real life, however, it takes some amount of time to do everything. Even a time of fractions of a millisecond is enough to throw your code off. If you manually right click and hit save, there will indeed be a small delay until the dialog box appears. Syncing everything may seem like a difficult fix, but the code required is quite simple.
     
     
     Opening New Windows 
    AHK sends its commands very quickly (as it is supposed to do). If click on any buttons that activate new windows or dialog boxes, you may run into problems. As mentioned above, the script will execute correctly, but not as intended; rather, it will send some (or all) of the commands in the time it takes for the message box to appear and become active. The solution is to wait until the new window is active and ready for input. Simply use the command
    Winwait, xxxxxx where xxxxxx is the full or partial title of the window. It is important to note that this string can either be the full exact title or just the first few characters. For example, if I am editing a file called nos.17_VehiculosFamilias_1c90deg.dat, I could type
    Winwait, nos.17 Using just “nos.17” is enough for the script to recognize which window it is waiting on.
    If the title is not explicitly stated in the window like it is below,

    Windows Task Manager can give you the appropriate name.

    Remember, only the first part of a window name is required. If the name is long or complex, the first few letters should suffice.
     
     
     
     Loops 
    To repeat tasks multiple times, one could either copy and paste the commands the necessary number of times, or use loops. Loops, if you are not familiar with them, will simply repeat the tasks within the braces { } a specified number of times for example,
    Loop, 4 { Send ^v Send {Enter} } would paste whatever is in the clipboard five times on a new line (another description). For obvious reasons, this method is preferred for larger numbers but is also easier to read and debug for small numbers (like 4) too. NOTE: The number in the loop control starts at 0. So if you want something to happen 4 times you will need to enter 3 (0 1 2 3), and so on. The general equation for the number of times you want to loop: n-1. If you’re interested why, (1) and (2); if not, just try and remember that.
     
     
     
     Comments 
    Comments are used for your convenience. Comments are bodies of text that the computer skips over and will not execute - their purpose is to either explain what should happen when some code executes or anything else the programmer wants to say. As such, they are never required but always recommended. In AutoHotkey, everything after a semicolon (;) on the same line will not parse (they will be completely ignored by the computer). An example:
    Click 380,590 ; Click Apply Everything after the semicolon ( Click Apply) will be ignored by the computer. It is only for my benefit to remember what each line is supposed to do. Comments in no way are required on every line. I've merely included them for sake of clarity so others can read my code.
     
     
     
     Saving and Running the Script 
    Whenever you are finished. Simply save your notepad document. If you haven’t already, change the extension from *.txt to *.ahk. Windows might give you a warning telling you that changing the extension may make the file unstable – this is generally a good warning but not applicable here and can be ignored. Changing *.txt to *.ahk will in no way change anything in the file – it will simply associate that file as an AutoHotkey script instead of a lowly text file.
    Once the file is renamed, right click on it and you should see some additional options in the menu.

    “Run Script” will make the script become active. Hit whatever hotkey(s) you assigned, and your script will execute every time you press the key(s). You will see an icon appear in your system tray. Right clicking there will allow you to do a few different things, including closing the script so it will no longer run (Exit). “Compile Script” will automatically convert the script to a *.exe file. It can be exited in the same fashion from the system tray. “Edit Script” opens the notepad file and allows the script to be edited. Note that just double clicking like normal to open the file actually has the same effect of “Run Script.” This is one of the other results of changing the file extension to *.ahk.      
    “Open” “Help” opens the AutoHotkey help documents which can be a great help in finding the correct syntax. “Window Spy” launches au3_spy.exe. See the "Sending Mouse Clicks" subsection for an explanation of its purpose. “Reload This Script” recompiles the script. If any changes were made, they will now be active. “Edit This Script” opens the notepad file and allows the script to be edited in whichever editor you assigned as default for the *.ahk extension. “Suspend Hotkeys” will keep the script active but disable any hotkeys mapped within the script. Useful if the key combination you assigned is actually used in some other program. The H tray icon will be replaced with a similar looking icon, but with an S. “Pause Script” prevents any part of the script from running until it is manually resumed. The tray icon will be replaced with a red one. “Compile Script” will automatically convert the script to a *.exe file. It can be exited in the same fashion from the system tray. “Exit” completely closes and ends the AutoHotkey process.  
     
     Examples 
    There is simply an immense amount of things one can do with AutoHotkey scripts. However, the things outlined above should be enough to complete most of your scripts for SC4 modding (they’re all I’ve used so far).
    To make your own, identify something repetitive that you do that can be easily scripted. The two examples below detail my method of solving these problems. As with coding, a multitude of approaches exist, and the only incorrect one is the one that does not work (or perhaps takes an inordinate amount of time).
     
    LeProp_SaveClose.ahk
    For those that do not know, LeProp has a peculiar bug where it can only save one action at a time. As such, one needs to close and reopen to edit multiple things on a lot. It can be quite tedious having to save, close, navigate to, and run the LeProp executable. This script is designed to fix that.
    !x:: Click 380,590 ; Click Apply Click 550,120  ; Click Save WinWaitActive, LEProp ; Wait for “Save Successful!” dialogue box Send {Enter} ; Closes “Save Successful!” dialogue box WinWaitActive, iLive ; Waits for main window to be active (“Save Successful!” dialogue box is fully closed) Send {Esc} ; Close LeProp run, C:\Program Files (x86)\iLives\LEProp.exe ; Opens LeProp WinWaitActive, Ilive ; Waits for main window to be active Send {Enter} ; Opens the “Open File” window
     
    Reader_Add_BuildingPropFamily.ahk
    #a::     ; Hit Windows-a to activate Click right 1200, 600        ; Right click in the right pane Send {Down} {Down} {Down} {Down} {Enter}  ; Select “Add Property” WinWaitActive, Property :             ; Wait for Property editor to appear Click 425, 50      ; Click to expand the Name menu Send buil ; Type to scroll list to Building/prop Family Click 250, 105     ; Select Building/prop Family Click 450, 255     ; Select Add Click 40, 635      ; Click in the Values as text field Click 40, 635      ; Not sure why I have this twice Send 0x5f85e126    ; Your prop family IID goes here Click 435, 635     ; Hit first Apply Click 190, 700     ; Hit Second Apply WinWaitActive, Reader  ; Change to Reader main window name; partial name is acceptable Click 1200, 235   ; Click on Building/prop family property Send ^c ; Copies that property to the clipboard Click 870, 1000   ; Click to place focus in the left pane Send {Down}       ; Move down to select next exemplar   Loop, 257     ; Change to number of exemplars starting count at 0: e.g. if last num is 65, use 66 { Click 1200, 600   ; Click to place focus in the right pane Send ^v            ; Paste the property Click 870, 1000   ; Click to place focus in the left pane Send {Down}       ; Move down to select next exemplar }                  ; Repeat
     
     
     Conclusion 
      If anyone has questions or needs help on their scripts, I will be happy to help. If I don't start a thread, just shoot me a PM and we can work out your problems together. Happy modding! ...
  10. _Michael liked an article by nos.17, AutoHotkey as a Modding Tool   
    For those who are not familiar with it, Autohotkey is a fantastic open source program designed to replicate repetitive keyboard or mouse actions. As with any sort of coding, the possibilities are technically limitless, but so far I have used small script (about 20 lines) to save and open new exemplars in LeProp, and add/remove properties dozens of props in the Reader. What would have taken probably 20-30 minutes, one is able to achieve in under 5 seconds!
    As I said above, the possibilities are limitless, so I will make this tutorial as general as possible while showing examples of scripts I have created.
    This tutorial will be continuously updated as suggestions for inclusions are offered.
     
     
     Introduction 
    This tutorial is aimed towards any custom content creator who regularly, or semi-regularly has to perform repetitive tasks in the Reader or any other application. Simple text scripts can be used to quickly and easily automate such tasks. Skills learned can also be applied to any program or procedure outside of Sc4 also.
    This tutorial is worded simply so those with zero programming experience can complete their first script. This tutorial only covers a few of the basics. There are hundreds of more advanced functions for more experienced users. The AutoHotkey Help file is a great resource for this.
     
     
     Getting Started 
    Download AutoHotkey here. You will notice that there is no interface to start up and code into. This is because everything is done through simple text files.
    The first step is to identify a procedure you would like to automate, for example, adding Prop Family properties for a collection of 80 props. You will need to know exactly what you are doing for the task at hand. As you go through the process manually for the first few times, make careful notes of when and where you click, what you type in, etc. It may be helpful to write a procedure down on paper as you go.
    The second step is to create a new *.txt file that will be used for the script. It is not important at all what it is named or where it is placed. As long as its file extension is changed to *.ahk at some point, it will become associated with Autohotkey and everything will work fine.
     
     
     Sending Key Presses 
    The most basic command is the Send command. Typing
    Send asdf will, upon execution of the script, will type out asdf automatically. Not very useful you say? Yes, you’re right.
    Some special keys can be activated by enclosing their name in braces { }. Be careful here. Typing
    Send Enter will literally type out Enter as text: that is, the letter “E” followed by “n,” “t,” “e,” “r.” This does NOT have the same effect as pressing the enter button (obviously, typing “Enter” into Word will not put the cursor on a new line – the same concept applies to scripts). To simulate pressing the Enter button,
    Send {Enter} should be used instead. Other examples include {Shift}, {Delete}, {Tab}, etc.; for the arrow keys, {Up}, {Down}, {Left}, {Right} are the appropriate commands. Any of the other special keys are called using special characters instead:
    !  .......... Alt
    #.......... Windows
    +.......... Shift
    & ......... Used to combine two keys to a single new one (eg. f&g = hold “f” and press “g”)
    ^ ......... Ctrl
    < , > .... If there are a pair of keys, <! Signifies Left Alt and >! Signifies Right Alt; ! would trigger when any Alt is pressed, for example.
    From this, we can refine our script a little more:
    !u:: Send asdf Will type “asdf” when Alt and the 'u' key is pressed. A little more useful, don’t you think? Note the double colon after the statement. This demarks the start of the code that will be executed when those buttons are pressed. Adding a
    return demarks the end of the code for that hotkey. For simple scripts, it is not strictly needed, but for good practice, we will amend the code to include it anyways:
    !u:: Send asdf return  
     
     Sending Mouse Clicks 
    Every page can technically be operated without a mouse, but using 50 Tabs or Shift-Tabs to advance focus to the button you are looking for is inefficient, time-consuming, and dumb. There are numerous ways to do this; by far the simplest method is to use mouse clicks. The syntax
    Click xx, yy or, for a right click,
    Click right xx, yy simulates a left or right click at xx and yy, where xx and yy are the x and y coordinates of the button on the window you are using. Figuring out these coordinates will probably be the most time-consuming part. Fortunately, there is a tool which comes packaged with AHK that makes this process simple. Navigate to the AHK installation folder and run au3_spy.exe (or type it in the start menu).
    Among other things, the program will give you a live readout of the x and y coordinates of your mouse pointer for the current window and your overall screen. USE THE COORDINATES FOR THE CURRENT WINDOW. The “On Screen” coordinates are marked “less often used,” which is apt. You want to use the mouse position in the active window for numerous reasons, the largest being that if you drag the window around your screen, the Active Window coordinates will remain constant while the Screen coordinates will change.

     
    This is where careful notes come in handy. Going through the process manually with au3_spy open in the background, recording somewhere the x and y coordinates of any buttons needed in your task. For example, we could write a script that (in notepad) will paste something from the clipboard with minimal effort:
    !u:: Click right Send {Down}{Down}{Down}{Down}{Enter} return NOTE: In the example above, it is possible to use a mouse click to press the paste button instead of pressing Down 4x and enter, however, this method will be dependent on coordinates of the initial right click. Thus, many times it may be easier to chain arrow key commands instead of locating mouse positions.
     
    To transition to the next topic, suppose we have the following code:
    #s:: Click right Send {Down}{Down}{Down}{Enter}{Enter} return Which, when run on my internet browser (Chrome) will right click where the cursor is, open the save dialog box, and hit “Enter” to finalize the save. Run it, and you will notice that it does not entirely do what we want it to do. It will open the save dialog box, but the second enter (to finalize the save) does not seem to execute.
    This is a simple error in timing. When the script executes, all of the commands are sent instantaneously. This is the ideal condition; in real life, however, it takes some amount of time to do everything. Even a time of fractions of a millisecond is enough to throw your code off. If you manually right click and hit save, there will indeed be a small delay until the dialog box appears. Syncing everything may seem like a difficult fix, but the code required is quite simple.
     
     
     Opening New Windows 
    AHK sends its commands very quickly (as it is supposed to do). If click on any buttons that activate new windows or dialog boxes, you may run into problems. As mentioned above, the script will execute correctly, but not as intended; rather, it will send some (or all) of the commands in the time it takes for the message box to appear and become active. The solution is to wait until the new window is active and ready for input. Simply use the command
    Winwait, xxxxxx where xxxxxx is the full or partial title of the window. It is important to note that this string can either be the full exact title or just the first few characters. For example, if I am editing a file called nos.17_VehiculosFamilias_1c90deg.dat, I could type
    Winwait, nos.17 Using just “nos.17” is enough for the script to recognize which window it is waiting on.
    If the title is not explicitly stated in the window like it is below,

    Windows Task Manager can give you the appropriate name.

    Remember, only the first part of a window name is required. If the name is long or complex, the first few letters should suffice.
     
     
     
     Loops 
    To repeat tasks multiple times, one could either copy and paste the commands the necessary number of times, or use loops. Loops, if you are not familiar with them, will simply repeat the tasks within the braces { } a specified number of times for example,
    Loop, 4 { Send ^v Send {Enter} } would paste whatever is in the clipboard five times on a new line (another description). For obvious reasons, this method is preferred for larger numbers but is also easier to read and debug for small numbers (like 4) too. NOTE: The number in the loop control starts at 0. So if you want something to happen 4 times you will need to enter 3 (0 1 2 3), and so on. The general equation for the number of times you want to loop: n-1. If you’re interested why, (1) and (2); if not, just try and remember that.
     
     
     
     Comments 
    Comments are used for your convenience. Comments are bodies of text that the computer skips over and will not execute - their purpose is to either explain what should happen when some code executes or anything else the programmer wants to say. As such, they are never required but always recommended. In AutoHotkey, everything after a semicolon (;) on the same line will not parse (they will be completely ignored by the computer). An example:
    Click 380,590 ; Click Apply Everything after the semicolon ( Click Apply) will be ignored by the computer. It is only for my benefit to remember what each line is supposed to do. Comments in no way are required on every line. I've merely included them for sake of clarity so others can read my code.
     
     
     
     Saving and Running the Script 
    Whenever you are finished. Simply save your notepad document. If you haven’t already, change the extension from *.txt to *.ahk. Windows might give you a warning telling you that changing the extension may make the file unstable – this is generally a good warning but not applicable here and can be ignored. Changing *.txt to *.ahk will in no way change anything in the file – it will simply associate that file as an AutoHotkey script instead of a lowly text file.
    Once the file is renamed, right click on it and you should see some additional options in the menu.

    “Run Script” will make the script become active. Hit whatever hotkey(s) you assigned, and your script will execute every time you press the key(s). You will see an icon appear in your system tray. Right clicking there will allow you to do a few different things, including closing the script so it will no longer run (Exit). “Compile Script” will automatically convert the script to a *.exe file. It can be exited in the same fashion from the system tray. “Edit Script” opens the notepad file and allows the script to be edited. Note that just double clicking like normal to open the file actually has the same effect of “Run Script.” This is one of the other results of changing the file extension to *.ahk.      
    “Open” “Help” opens the AutoHotkey help documents which can be a great help in finding the correct syntax. “Window Spy” launches au3_spy.exe. See the "Sending Mouse Clicks" subsection for an explanation of its purpose. “Reload This Script” recompiles the script. If any changes were made, they will now be active. “Edit This Script” opens the notepad file and allows the script to be edited in whichever editor you assigned as default for the *.ahk extension. “Suspend Hotkeys” will keep the script active but disable any hotkeys mapped within the script. Useful if the key combination you assigned is actually used in some other program. The H tray icon will be replaced with a similar looking icon, but with an S. “Pause Script” prevents any part of the script from running until it is manually resumed. The tray icon will be replaced with a red one. “Compile Script” will automatically convert the script to a *.exe file. It can be exited in the same fashion from the system tray. “Exit” completely closes and ends the AutoHotkey process.  
     
     Examples 
    There is simply an immense amount of things one can do with AutoHotkey scripts. However, the things outlined above should be enough to complete most of your scripts for SC4 modding (they’re all I’ve used so far).
    To make your own, identify something repetitive that you do that can be easily scripted. The two examples below detail my method of solving these problems. As with coding, a multitude of approaches exist, and the only incorrect one is the one that does not work (or perhaps takes an inordinate amount of time).
     
    LeProp_SaveClose.ahk
    For those that do not know, LeProp has a peculiar bug where it can only save one action at a time. As such, one needs to close and reopen to edit multiple things on a lot. It can be quite tedious having to save, close, navigate to, and run the LeProp executable. This script is designed to fix that.
    !x:: Click 380,590 ; Click Apply Click 550,120  ; Click Save WinWaitActive, LEProp ; Wait for “Save Successful!” dialogue box Send {Enter} ; Closes “Save Successful!” dialogue box WinWaitActive, iLive ; Waits for main window to be active (“Save Successful!” dialogue box is fully closed) Send {Esc} ; Close LeProp run, C:\Program Files (x86)\iLives\LEProp.exe ; Opens LeProp WinWaitActive, Ilive ; Waits for main window to be active Send {Enter} ; Opens the “Open File” window
     
    Reader_Add_BuildingPropFamily.ahk
    #a::     ; Hit Windows-a to activate Click right 1200, 600        ; Right click in the right pane Send {Down} {Down} {Down} {Down} {Enter}  ; Select “Add Property” WinWaitActive, Property :             ; Wait for Property editor to appear Click 425, 50      ; Click to expand the Name menu Send buil ; Type to scroll list to Building/prop Family Click 250, 105     ; Select Building/prop Family Click 450, 255     ; Select Add Click 40, 635      ; Click in the Values as text field Click 40, 635      ; Not sure why I have this twice Send 0x5f85e126    ; Your prop family IID goes here Click 435, 635     ; Hit first Apply Click 190, 700     ; Hit Second Apply WinWaitActive, Reader  ; Change to Reader main window name; partial name is acceptable Click 1200, 235   ; Click on Building/prop family property Send ^c ; Copies that property to the clipboard Click 870, 1000   ; Click to place focus in the left pane Send {Down}       ; Move down to select next exemplar   Loop, 257     ; Change to number of exemplars starting count at 0: e.g. if last num is 65, use 66 { Click 1200, 600   ; Click to place focus in the right pane Send ^v            ; Paste the property Click 870, 1000   ; Click to place focus in the left pane Send {Down}       ; Move down to select next exemplar }                  ; Repeat
     
     
     Conclusion 
      If anyone has questions or needs help on their scripts, I will be happy to help. If I don't start a thread, just shoot me a PM and we can work out your problems together. Happy modding! ...
  11. _Michael liked an article by nos.17, AutoHotkey as a Modding Tool   
    For those who are not familiar with it, Autohotkey is a fantastic open source program designed to replicate repetitive keyboard or mouse actions. As with any sort of coding, the possibilities are technically limitless, but so far I have used small script (about 20 lines) to save and open new exemplars in LeProp, and add/remove properties dozens of props in the Reader. What would have taken probably 20-30 minutes, one is able to achieve in under 5 seconds!
    As I said above, the possibilities are limitless, so I will make this tutorial as general as possible while showing examples of scripts I have created.
    This tutorial will be continuously updated as suggestions for inclusions are offered.
     
     
     Introduction 
    This tutorial is aimed towards any custom content creator who regularly, or semi-regularly has to perform repetitive tasks in the Reader or any other application. Simple text scripts can be used to quickly and easily automate such tasks. Skills learned can also be applied to any program or procedure outside of Sc4 also.
    This tutorial is worded simply so those with zero programming experience can complete their first script. This tutorial only covers a few of the basics. There are hundreds of more advanced functions for more experienced users. The AutoHotkey Help file is a great resource for this.
     
     
     Getting Started 
    Download AutoHotkey here. You will notice that there is no interface to start up and code into. This is because everything is done through simple text files.
    The first step is to identify a procedure you would like to automate, for example, adding Prop Family properties for a collection of 80 props. You will need to know exactly what you are doing for the task at hand. As you go through the process manually for the first few times, make careful notes of when and where you click, what you type in, etc. It may be helpful to write a procedure down on paper as you go.
    The second step is to create a new *.txt file that will be used for the script. It is not important at all what it is named or where it is placed. As long as its file extension is changed to *.ahk at some point, it will become associated with Autohotkey and everything will work fine.
     
     
     Sending Key Presses 
    The most basic command is the Send command. Typing
    Send asdf will, upon execution of the script, will type out asdf automatically. Not very useful you say? Yes, you’re right.
    Some special keys can be activated by enclosing their name in braces { }. Be careful here. Typing
    Send Enter will literally type out Enter as text: that is, the letter “E” followed by “n,” “t,” “e,” “r.” This does NOT have the same effect as pressing the enter button (obviously, typing “Enter” into Word will not put the cursor on a new line – the same concept applies to scripts). To simulate pressing the Enter button,
    Send {Enter} should be used instead. Other examples include {Shift}, {Delete}, {Tab}, etc.; for the arrow keys, {Up}, {Down}, {Left}, {Right} are the appropriate commands. Any of the other special keys are called using special characters instead:
    !  .......... Alt
    #.......... Windows
    +.......... Shift
    & ......... Used to combine two keys to a single new one (eg. f&g = hold “f” and press “g”)
    ^ ......... Ctrl
    < , > .... If there are a pair of keys, <! Signifies Left Alt and >! Signifies Right Alt; ! would trigger when any Alt is pressed, for example.
    From this, we can refine our script a little more:
    !u:: Send asdf Will type “asdf” when Alt and the 'u' key is pressed. A little more useful, don’t you think? Note the double colon after the statement. This demarks the start of the code that will be executed when those buttons are pressed. Adding a
    return demarks the end of the code for that hotkey. For simple scripts, it is not strictly needed, but for good practice, we will amend the code to include it anyways:
    !u:: Send asdf return  
     
     Sending Mouse Clicks 
    Every page can technically be operated without a mouse, but using 50 Tabs or Shift-Tabs to advance focus to the button you are looking for is inefficient, time-consuming, and dumb. There are numerous ways to do this; by far the simplest method is to use mouse clicks. The syntax
    Click xx, yy or, for a right click,
    Click right xx, yy simulates a left or right click at xx and yy, where xx and yy are the x and y coordinates of the button on the window you are using. Figuring out these coordinates will probably be the most time-consuming part. Fortunately, there is a tool which comes packaged with AHK that makes this process simple. Navigate to the AHK installation folder and run au3_spy.exe (or type it in the start menu).
    Among other things, the program will give you a live readout of the x and y coordinates of your mouse pointer for the current window and your overall screen. USE THE COORDINATES FOR THE CURRENT WINDOW. The “On Screen” coordinates are marked “less often used,” which is apt. You want to use the mouse position in the active window for numerous reasons, the largest being that if you drag the window around your screen, the Active Window coordinates will remain constant while the Screen coordinates will change.

     
    This is where careful notes come in handy. Going through the process manually with au3_spy open in the background, recording somewhere the x and y coordinates of any buttons needed in your task. For example, we could write a script that (in notepad) will paste something from the clipboard with minimal effort:
    !u:: Click right Send {Down}{Down}{Down}{Down}{Enter} return NOTE: In the example above, it is possible to use a mouse click to press the paste button instead of pressing Down 4x and enter, however, this method will be dependent on coordinates of the initial right click. Thus, many times it may be easier to chain arrow key commands instead of locating mouse positions.
     
    To transition to the next topic, suppose we have the following code:
    #s:: Click right Send {Down}{Down}{Down}{Enter}{Enter} return Which, when run on my internet browser (Chrome) will right click where the cursor is, open the save dialog box, and hit “Enter” to finalize the save. Run it, and you will notice that it does not entirely do what we want it to do. It will open the save dialog box, but the second enter (to finalize the save) does not seem to execute.
    This is a simple error in timing. When the script executes, all of the commands are sent instantaneously. This is the ideal condition; in real life, however, it takes some amount of time to do everything. Even a time of fractions of a millisecond is enough to throw your code off. If you manually right click and hit save, there will indeed be a small delay until the dialog box appears. Syncing everything may seem like a difficult fix, but the code required is quite simple.
     
     
     Opening New Windows 
    AHK sends its commands very quickly (as it is supposed to do). If click on any buttons that activate new windows or dialog boxes, you may run into problems. As mentioned above, the script will execute correctly, but not as intended; rather, it will send some (or all) of the commands in the time it takes for the message box to appear and become active. The solution is to wait until the new window is active and ready for input. Simply use the command
    Winwait, xxxxxx where xxxxxx is the full or partial title of the window. It is important to note that this string can either be the full exact title or just the first few characters. For example, if I am editing a file called nos.17_VehiculosFamilias_1c90deg.dat, I could type
    Winwait, nos.17 Using just “nos.17” is enough for the script to recognize which window it is waiting on.
    If the title is not explicitly stated in the window like it is below,

    Windows Task Manager can give you the appropriate name.

    Remember, only the first part of a window name is required. If the name is long or complex, the first few letters should suffice.
     
     
     
     Loops 
    To repeat tasks multiple times, one could either copy and paste the commands the necessary number of times, or use loops. Loops, if you are not familiar with them, will simply repeat the tasks within the braces { } a specified number of times for example,
    Loop, 4 { Send ^v Send {Enter} } would paste whatever is in the clipboard five times on a new line (another description). For obvious reasons, this method is preferred for larger numbers but is also easier to read and debug for small numbers (like 4) too. NOTE: The number in the loop control starts at 0. So if you want something to happen 4 times you will need to enter 3 (0 1 2 3), and so on. The general equation for the number of times you want to loop: n-1. If you’re interested why, (1) and (2); if not, just try and remember that.
     
     
     
     Comments 
    Comments are used for your convenience. Comments are bodies of text that the computer skips over and will not execute - their purpose is to either explain what should happen when some code executes or anything else the programmer wants to say. As such, they are never required but always recommended. In AutoHotkey, everything after a semicolon (;) on the same line will not parse (they will be completely ignored by the computer). An example:
    Click 380,590 ; Click Apply Everything after the semicolon ( Click Apply) will be ignored by the computer. It is only for my benefit to remember what each line is supposed to do. Comments in no way are required on every line. I've merely included them for sake of clarity so others can read my code.
     
     
     
     Saving and Running the Script 
    Whenever you are finished. Simply save your notepad document. If you haven’t already, change the extension from *.txt to *.ahk. Windows might give you a warning telling you that changing the extension may make the file unstable – this is generally a good warning but not applicable here and can be ignored. Changing *.txt to *.ahk will in no way change anything in the file – it will simply associate that file as an AutoHotkey script instead of a lowly text file.
    Once the file is renamed, right click on it and you should see some additional options in the menu.

    “Run Script” will make the script become active. Hit whatever hotkey(s) you assigned, and your script will execute every time you press the key(s). You will see an icon appear in your system tray. Right clicking there will allow you to do a few different things, including closing the script so it will no longer run (Exit). “Compile Script” will automatically convert the script to a *.exe file. It can be exited in the same fashion from the system tray. “Edit Script” opens the notepad file and allows the script to be edited. Note that just double clicking like normal to open the file actually has the same effect of “Run Script.” This is one of the other results of changing the file extension to *.ahk.      
    “Open” “Help” opens the AutoHotkey help documents which can be a great help in finding the correct syntax. “Window Spy” launches au3_spy.exe. See the "Sending Mouse Clicks" subsection for an explanation of its purpose. “Reload This Script” recompiles the script. If any changes were made, they will now be active. “Edit This Script” opens the notepad file and allows the script to be edited in whichever editor you assigned as default for the *.ahk extension. “Suspend Hotkeys” will keep the script active but disable any hotkeys mapped within the script. Useful if the key combination you assigned is actually used in some other program. The H tray icon will be replaced with a similar looking icon, but with an S. “Pause Script” prevents any part of the script from running until it is manually resumed. The tray icon will be replaced with a red one. “Compile Script” will automatically convert the script to a *.exe file. It can be exited in the same fashion from the system tray. “Exit” completely closes and ends the AutoHotkey process.  
     
     Examples 
    There is simply an immense amount of things one can do with AutoHotkey scripts. However, the things outlined above should be enough to complete most of your scripts for SC4 modding (they’re all I’ve used so far).
    To make your own, identify something repetitive that you do that can be easily scripted. The two examples below detail my method of solving these problems. As with coding, a multitude of approaches exist, and the only incorrect one is the one that does not work (or perhaps takes an inordinate amount of time).
     
    LeProp_SaveClose.ahk
    For those that do not know, LeProp has a peculiar bug where it can only save one action at a time. As such, one needs to close and reopen to edit multiple things on a lot. It can be quite tedious having to save, close, navigate to, and run the LeProp executable. This script is designed to fix that.
    !x:: Click 380,590 ; Click Apply Click 550,120  ; Click Save WinWaitActive, LEProp ; Wait for “Save Successful!” dialogue box Send {Enter} ; Closes “Save Successful!” dialogue box WinWaitActive, iLive ; Waits for main window to be active (“Save Successful!” dialogue box is fully closed) Send {Esc} ; Close LeProp run, C:\Program Files (x86)\iLives\LEProp.exe ; Opens LeProp WinWaitActive, Ilive ; Waits for main window to be active Send {Enter} ; Opens the “Open File” window
     
    Reader_Add_BuildingPropFamily.ahk
    #a::     ; Hit Windows-a to activate Click right 1200, 600        ; Right click in the right pane Send {Down} {Down} {Down} {Down} {Enter}  ; Select “Add Property” WinWaitActive, Property :             ; Wait for Property editor to appear Click 425, 50      ; Click to expand the Name menu Send buil ; Type to scroll list to Building/prop Family Click 250, 105     ; Select Building/prop Family Click 450, 255     ; Select Add Click 40, 635      ; Click in the Values as text field Click 40, 635      ; Not sure why I have this twice Send 0x5f85e126    ; Your prop family IID goes here Click 435, 635     ; Hit first Apply Click 190, 700     ; Hit Second Apply WinWaitActive, Reader  ; Change to Reader main window name; partial name is acceptable Click 1200, 235   ; Click on Building/prop family property Send ^c ; Copies that property to the clipboard Click 870, 1000   ; Click to place focus in the left pane Send {Down}       ; Move down to select next exemplar   Loop, 257     ; Change to number of exemplars starting count at 0: e.g. if last num is 65, use 66 { Click 1200, 600   ; Click to place focus in the right pane Send ^v            ; Paste the property Click 870, 1000   ; Click to place focus in the left pane Send {Down}       ; Move down to select next exemplar }                  ; Repeat
     
     
     Conclusion 
      If anyone has questions or needs help on their scripts, I will be happy to help. If I don't start a thread, just shoot me a PM and we can work out your problems together. Happy modding! ...
  12. _Michael liked an article by nos.17, AutoHotkey as a Modding Tool   
    For those who are not familiar with it, Autohotkey is a fantastic open source program designed to replicate repetitive keyboard or mouse actions. As with any sort of coding, the possibilities are technically limitless, but so far I have used small script (about 20 lines) to save and open new exemplars in LeProp, and add/remove properties dozens of props in the Reader. What would have taken probably 20-30 minutes, one is able to achieve in under 5 seconds!
    As I said above, the possibilities are limitless, so I will make this tutorial as general as possible while showing examples of scripts I have created.
    This tutorial will be continuously updated as suggestions for inclusions are offered.
     
     
     Introduction 
    This tutorial is aimed towards any custom content creator who regularly, or semi-regularly has to perform repetitive tasks in the Reader or any other application. Simple text scripts can be used to quickly and easily automate such tasks. Skills learned can also be applied to any program or procedure outside of Sc4 also.
    This tutorial is worded simply so those with zero programming experience can complete their first script. This tutorial only covers a few of the basics. There are hundreds of more advanced functions for more experienced users. The AutoHotkey Help file is a great resource for this.
     
     
     Getting Started 
    Download AutoHotkey here. You will notice that there is no interface to start up and code into. This is because everything is done through simple text files.
    The first step is to identify a procedure you would like to automate, for example, adding Prop Family properties for a collection of 80 props. You will need to know exactly what you are doing for the task at hand. As you go through the process manually for the first few times, make careful notes of when and where you click, what you type in, etc. It may be helpful to write a procedure down on paper as you go.
    The second step is to create a new *.txt file that will be used for the script. It is not important at all what it is named or where it is placed. As long as its file extension is changed to *.ahk at some point, it will become associated with Autohotkey and everything will work fine.
     
     
     Sending Key Presses 
    The most basic command is the Send command. Typing
    Send asdf will, upon execution of the script, will type out asdf automatically. Not very useful you say? Yes, you’re right.
    Some special keys can be activated by enclosing their name in braces { }. Be careful here. Typing
    Send Enter will literally type out Enter as text: that is, the letter “E” followed by “n,” “t,” “e,” “r.” This does NOT have the same effect as pressing the enter button (obviously, typing “Enter” into Word will not put the cursor on a new line – the same concept applies to scripts). To simulate pressing the Enter button,
    Send {Enter} should be used instead. Other examples include {Shift}, {Delete}, {Tab}, etc.; for the arrow keys, {Up}, {Down}, {Left}, {Right} are the appropriate commands. Any of the other special keys are called using special characters instead:
    !  .......... Alt
    #.......... Windows
    +.......... Shift
    & ......... Used to combine two keys to a single new one (eg. f&g = hold “f” and press “g”)
    ^ ......... Ctrl
    < , > .... If there are a pair of keys, <! Signifies Left Alt and >! Signifies Right Alt; ! would trigger when any Alt is pressed, for example.
    From this, we can refine our script a little more:
    !u:: Send asdf Will type “asdf” when Alt and the 'u' key is pressed. A little more useful, don’t you think? Note the double colon after the statement. This demarks the start of the code that will be executed when those buttons are pressed. Adding a
    return demarks the end of the code for that hotkey. For simple scripts, it is not strictly needed, but for good practice, we will amend the code to include it anyways:
    !u:: Send asdf return  
     
     Sending Mouse Clicks 
    Every page can technically be operated without a mouse, but using 50 Tabs or Shift-Tabs to advance focus to the button you are looking for is inefficient, time-consuming, and dumb. There are numerous ways to do this; by far the simplest method is to use mouse clicks. The syntax
    Click xx, yy or, for a right click,
    Click right xx, yy simulates a left or right click at xx and yy, where xx and yy are the x and y coordinates of the button on the window you are using. Figuring out these coordinates will probably be the most time-consuming part. Fortunately, there is a tool which comes packaged with AHK that makes this process simple. Navigate to the AHK installation folder and run au3_spy.exe (or type it in the start menu).
    Among other things, the program will give you a live readout of the x and y coordinates of your mouse pointer for the current window and your overall screen. USE THE COORDINATES FOR THE CURRENT WINDOW. The “On Screen” coordinates are marked “less often used,” which is apt. You want to use the mouse position in the active window for numerous reasons, the largest being that if you drag the window around your screen, the Active Window coordinates will remain constant while the Screen coordinates will change.

     
    This is where careful notes come in handy. Going through the process manually with au3_spy open in the background, recording somewhere the x and y coordinates of any buttons needed in your task. For example, we could write a script that (in notepad) will paste something from the clipboard with minimal effort:
    !u:: Click right Send {Down}{Down}{Down}{Down}{Enter} return NOTE: In the example above, it is possible to use a mouse click to press the paste button instead of pressing Down 4x and enter, however, this method will be dependent on coordinates of the initial right click. Thus, many times it may be easier to chain arrow key commands instead of locating mouse positions.
     
    To transition to the next topic, suppose we have the following code:
    #s:: Click right Send {Down}{Down}{Down}{Enter}{Enter} return Which, when run on my internet browser (Chrome) will right click where the cursor is, open the save dialog box, and hit “Enter” to finalize the save. Run it, and you will notice that it does not entirely do what we want it to do. It will open the save dialog box, but the second enter (to finalize the save) does not seem to execute.
    This is a simple error in timing. When the script executes, all of the commands are sent instantaneously. This is the ideal condition; in real life, however, it takes some amount of time to do everything. Even a time of fractions of a millisecond is enough to throw your code off. If you manually right click and hit save, there will indeed be a small delay until the dialog box appears. Syncing everything may seem like a difficult fix, but the code required is quite simple.
     
     
     Opening New Windows 
    AHK sends its commands very quickly (as it is supposed to do). If click on any buttons that activate new windows or dialog boxes, you may run into problems. As mentioned above, the script will execute correctly, but not as intended; rather, it will send some (or all) of the commands in the time it takes for the message box to appear and become active. The solution is to wait until the new window is active and ready for input. Simply use the command
    Winwait, xxxxxx where xxxxxx is the full or partial title of the window. It is important to note that this string can either be the full exact title or just the first few characters. For example, if I am editing a file called nos.17_VehiculosFamilias_1c90deg.dat, I could type
    Winwait, nos.17 Using just “nos.17” is enough for the script to recognize which window it is waiting on.
    If the title is not explicitly stated in the window like it is below,

    Windows Task Manager can give you the appropriate name.

    Remember, only the first part of a window name is required. If the name is long or complex, the first few letters should suffice.
     
     
     
     Loops 
    To repeat tasks multiple times, one could either copy and paste the commands the necessary number of times, or use loops. Loops, if you are not familiar with them, will simply repeat the tasks within the braces { } a specified number of times for example,
    Loop, 4 { Send ^v Send {Enter} } would paste whatever is in the clipboard five times on a new line (another description). For obvious reasons, this method is preferred for larger numbers but is also easier to read and debug for small numbers (like 4) too. NOTE: The number in the loop control starts at 0. So if you want something to happen 4 times you will need to enter 3 (0 1 2 3), and so on. The general equation for the number of times you want to loop: n-1. If you’re interested why, (1) and (2); if not, just try and remember that.
     
     
     
     Comments 
    Comments are used for your convenience. Comments are bodies of text that the computer skips over and will not execute - their purpose is to either explain what should happen when some code executes or anything else the programmer wants to say. As such, they are never required but always recommended. In AutoHotkey, everything after a semicolon (;) on the same line will not parse (they will be completely ignored by the computer). An example:
    Click 380,590 ; Click Apply Everything after the semicolon ( Click Apply) will be ignored by the computer. It is only for my benefit to remember what each line is supposed to do. Comments in no way are required on every line. I've merely included them for sake of clarity so others can read my code.
     
     
     
     Saving and Running the Script 
    Whenever you are finished. Simply save your notepad document. If you haven’t already, change the extension from *.txt to *.ahk. Windows might give you a warning telling you that changing the extension may make the file unstable – this is generally a good warning but not applicable here and can be ignored. Changing *.txt to *.ahk will in no way change anything in the file – it will simply associate that file as an AutoHotkey script instead of a lowly text file.
    Once the file is renamed, right click on it and you should see some additional options in the menu.

    “Run Script” will make the script become active. Hit whatever hotkey(s) you assigned, and your script will execute every time you press the key(s). You will see an icon appear in your system tray. Right clicking there will allow you to do a few different things, including closing the script so it will no longer run (Exit). “Compile Script” will automatically convert the script to a *.exe file. It can be exited in the same fashion from the system tray. “Edit Script” opens the notepad file and allows the script to be edited. Note that just double clicking like normal to open the file actually has the same effect of “Run Script.” This is one of the other results of changing the file extension to *.ahk.      
    “Open” “Help” opens the AutoHotkey help documents which can be a great help in finding the correct syntax. “Window Spy” launches au3_spy.exe. See the "Sending Mouse Clicks" subsection for an explanation of its purpose. “Reload This Script” recompiles the script. If any changes were made, they will now be active. “Edit This Script” opens the notepad file and allows the script to be edited in whichever editor you assigned as default for the *.ahk extension. “Suspend Hotkeys” will keep the script active but disable any hotkeys mapped within the script. Useful if the key combination you assigned is actually used in some other program. The H tray icon will be replaced with a similar looking icon, but with an S. “Pause Script” prevents any part of the script from running until it is manually resumed. The tray icon will be replaced with a red one. “Compile Script” will automatically convert the script to a *.exe file. It can be exited in the same fashion from the system tray. “Exit” completely closes and ends the AutoHotkey process.  
     
     Examples 
    There is simply an immense amount of things one can do with AutoHotkey scripts. However, the things outlined above should be enough to complete most of your scripts for SC4 modding (they’re all I’ve used so far).
    To make your own, identify something repetitive that you do that can be easily scripted. The two examples below detail my method of solving these problems. As with coding, a multitude of approaches exist, and the only incorrect one is the one that does not work (or perhaps takes an inordinate amount of time).
     
    LeProp_SaveClose.ahk
    For those that do not know, LeProp has a peculiar bug where it can only save one action at a time. As such, one needs to close and reopen to edit multiple things on a lot. It can be quite tedious having to save, close, navigate to, and run the LeProp executable. This script is designed to fix that.
    !x:: Click 380,590 ; Click Apply Click 550,120  ; Click Save WinWaitActive, LEProp ; Wait for “Save Successful!” dialogue box Send {Enter} ; Closes “Save Successful!” dialogue box WinWaitActive, iLive ; Waits for main window to be active (“Save Successful!” dialogue box is fully closed) Send {Esc} ; Close LeProp run, C:\Program Files (x86)\iLives\LEProp.exe ; Opens LeProp WinWaitActive, Ilive ; Waits for main window to be active Send {Enter} ; Opens the “Open File” window
     
    Reader_Add_BuildingPropFamily.ahk
    #a::     ; Hit Windows-a to activate Click right 1200, 600        ; Right click in the right pane Send {Down} {Down} {Down} {Down} {Enter}  ; Select “Add Property” WinWaitActive, Property :             ; Wait for Property editor to appear Click 425, 50      ; Click to expand the Name menu Send buil ; Type to scroll list to Building/prop Family Click 250, 105     ; Select Building/prop Family Click 450, 255     ; Select Add Click 40, 635      ; Click in the Values as text field Click 40, 635      ; Not sure why I have this twice Send 0x5f85e126    ; Your prop family IID goes here Click 435, 635     ; Hit first Apply Click 190, 700     ; Hit Second Apply WinWaitActive, Reader  ; Change to Reader main window name; partial name is acceptable Click 1200, 235   ; Click on Building/prop family property Send ^c ; Copies that property to the clipboard Click 870, 1000   ; Click to place focus in the left pane Send {Down}       ; Move down to select next exemplar   Loop, 257     ; Change to number of exemplars starting count at 0: e.g. if last num is 65, use 66 { Click 1200, 600   ; Click to place focus in the right pane Send ^v            ; Paste the property Click 870, 1000   ; Click to place focus in the left pane Send {Down}       ; Move down to select next exemplar }                  ; Repeat
     
     
     Conclusion 
      If anyone has questions or needs help on their scripts, I will be happy to help. If I don't start a thread, just shoot me a PM and we can work out your problems together. Happy modding! ...
  13. nos.17 liked an article by Cyclone Boom, [INFO] Windows Update KB3086255 prevents SimCity 4 from starting   
    Following the trend of Windows 10, Microsoft has released security update KB3086255 for Windows 7, Windows 8.1 & Windows Vista.
    Due to "security concerns", this intentionally disables the service which runs the secdrv.sys driver -- a component of the SafeDisk protection which SC4 uses.
     

    As a result, this prevents the disk-based (CD) version of SimCity 4 from running, and you may receive an "Access Denied - Please login with administrator privileges and try again" or similar permissions error. Many other legacy games are also affected.
    It would seem the update simply disables the service, rather than removing secdrv.sys completely (like Windows 10 has).
    NOTE: This shouldn't impact users of the digital game, such as from Amazon, Steam or Origin, as this doesn't rely on the same copy protection.

    Full details of the update are as follows:

    Security update for the graphics component in Windows
    September 8, 2015 (KB3086255)

    https://support.microsoft.com/en-gb/kb/3086255



    Workarounds
    1)  Purchase SC4 digitally

    Online retailers such as Amazon, GOG, Steam, Origin or GamersGate offer a digital version of SC4 Deluxe.
    This comes as a download without the need for the CD to start. It's also fully patched and doesn't use the same method of copy protection, so you can install KB3086255 without issue and play the game as normal. In the case of Amazon & GOG, the game is currently sold DRM free, meaning it starts by itself without a client service (e.g. Origin, Steam).
    During seasonal sales, you can often purchase the game for as little as $5.
     
    2)  Redeem your SC4 Serial Number

    You may be able to redeem your original Serial Number (product key), found at the back at the CD's manual. This may entitle you to a free digital copy of the game, with the same benefits of not needing other workarounds.
    With Origin you can try contacting customer support, who can usually assist with this. As well as the serial number, you may need to provide physical evidence that you own the boxed copy, such as screenshots of the game's case & disks.
    Other online retailers may also offer a similar option, so it's best to contact them directly.
     
    NOTE: Use at your own risk! 
    The following suggestions will allow SimCity 4 to run, although they could potentially expose your system to security vulnerabilities (which the update intends to bypass). Therefore it's your own responsibility should any issues arise from not installing KB3086255, however the risk level of security flaws being exploited.


    3)  Uninstall KB3086255
    If updates are set to install automatically, you may have this update already installed.

    In which case, to allow the CD game to start again, without the need for any workarounds, you'll need to uninstall the update:
    http://www.sevenforums.com/tutorials/24373-windows-update-uninstall-update.html
    A quick way to check if it's installed:
    Enter KB3086255 in the "Search Installed Updates" box at the top right.

    Note: To reduce the risk, it might be worth disconnecting from the internet whilst the game is running. Also it's recommended to ensure your anti-virus has the latest protection definitions.
     
    4)  Hide KB3086255
    If you haven't installed KB3086255, it might be worth hiding it from the list of updates:
    http://www.sevenforums.com/tutorials/24376-windows-update-hide-restore-hidden-updates.html
     
    5)  Enable secdrv.sys on demand
    However if you wish to retain the update, the below instructions (from the knowledge base article) describe how to start the service on demand, which should allow SC4 to run from the CD when you require:
     
     
    Using a script
    Alternatively, see the following link for a way to start the service using a batch file:
    https://www.reddit.com/r/simcity4/comments/3kmfmi/quick_and_dirty_solution_to_recent_windows_update/
     
    List of systems the update is offered to:
     
    Feel free to post any comments, questions or suggestions below, or in the dedicated support thread.
  14. nos.17 liked an article by andisart, Custom building foundations in 3DS Max   
    Custom building foundations in 3DS Max
    Tutorial level: Intermediate; general knowledge of BAT creation and modding required.
    There are two effective methods to create custom building foundations in 3DS Max.
    The first is creating building foundations the traditional way in the same fashion they work in the game (assigning a foundation model as a foundation in the Pluginmanager (PIM)), the other is using building and foundation as props.
    Both methods have their pros and cons:
    Traditional method
    + automatic matching of building and foundation in game
    + convenient to use in PIM when creating the lot
    - nightlights not possible for foundation (which then can create abrupt breaks if lights in scene illumine both building and foundation)
    - not suited for cases where LODs of building and foundation differ (impossible to match foundation to building in Lot Editor (LE))
    - possibility of a bug occuring requiring manual texture ID fix
    Method using props
    + nightlights on the foundation possible
    + foundation can extend beyond building as both can be matched manually in LE
    - matching process not 100% clean if LODs differ
    - extra step in lot creation needed: since building and foundation work as a prop, an empty object needs to be assigned as the actual building
    - if slope is too steep, slope can move into building because it functions as a prop. More finetuning in slope settings of lot required
    ___________________________________________________________________________________________
    Traditional method
    Create building and foundation as separate geometry.
    Make sure foundation geometry does not exceed ground level (0 on Z axis).

    Render seperately. When creating the LODs, make sure they sit on top of each other and have the same width and length (height can differ).
    If they don't building and foundation will not line up later in the game.
    Foundation LODs may not exceed ground level (0 at Z axis).

    When rendering the foundation LODs in gmax, make sure to select the option for "Foundation" in the BAT options tab:

    It is not necessary to render the nightview of the foundation, since nightlights don't work with this method anyway.
    Render building as normal.
    After rendering, assign the foundation model as a "Foundation" in the PIM:

    Afterwards assign the building model to a building type of your choice.
    In the properties options under the Advanced tab you can now select the building foundation you created before:

    When creating the lot in the LE you can just create your lot normally, the building foundation is already assigned to your building through the PIM.
    There is an option to change the foundation within the LE, however, when I tried that it didn't work properly, so better leave that option alone.
    Lastly, you need to make sure the lot can actually have a slope in the game. As an orientation: for the example model with a foundation of approx. 3m depth a good value for the threshold is 8. This is subject to fine-tuning.
    In the game it should then look like this, left on flat and right on slope with foundation:

    You should be done!
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Possible bug:
    If you don't see the foundation but instead just green, blue and red colors then the beforementioned bug hit you.
    In this case the material IDs of the foundation model need to be corrected. They need to say 0x00030xxx, and not 0x00031xxx or anything else.
    You can find the ID's in the Reader in the "Mats" tab of the S3D files of the model.
    Note: Every S3D file has to be fixed.

    ___________________________________________________________________________________________
    Method using props
    The two advantages of this methods are nightlights and the possibility of having differing LODs between building and foundation.
    The following model has a foundation that is wider than the building and a nightscene which illumines the foundation as well. So this method is the prefered choice.
    Foundation extends beyond building:

    Nightlights shine on the foundation (stairs going down), windows lit on foundation:

    LODs of foundation and building have different footprint:

    You start off as with the traditional method above with separate geometry and LODs for your building and foundation.
    However, the foundation LOD and geometry must be slightly below ground level, otherwise there will be glitches with the base and overlay textures on the lot. A value of -0,01 meters on the Z axis will work (values below that don't seem to work without glitches).
    During the rendering process there are the following differences:
    - you render the foundation LODs in gmax without the "Foundation" option ticked, that is as a normal model.
    - if foundation extends beyond the building footprint: when rendering the foundation leave the building in the scene to avoid false lighting of the extened foundation parts (if building not present the correct shadows cant be cast onto foundation parts).
    - if applicable, also render the nightscene of your foundation. As with for the dayscene inlcude the building as well, especially all lights shining onto the foundation
    In the PIM assign both models as props with the necessary options. Important here are to set IsGroundModel and QueryAsMainBuilding to true for the building model.
    (Note: Options changed for foundation were only Lights and AppearanceZoomsFlag. Changing other options hasn't been tested for foundation.)
    Now, because our building is a prop, we need a blank model that serves as the acutal building exemplar.
    For example create a small cube with LODs, then before rendering delete the cube and render LODs only.
    Use this blank model in the PIM to assign to the building type you want your lot to be.
    In the LE replace building with the blank model:

    Then add foundation and building props.

    In order to be able to allign the props you need to remove the base and probably the overlay textures as well.
    It's a bit tricky to match the two, if not impossible to perfectly allign. What helps is to not emphasize vertical elements between building and foundation. So it's advised to make the design so that the foundation is more independent from the building, i.e. without vertical elements reaching from building down to foundation.
    On the other hand, if your LODs have the same width and length the matching process is very simple in LE, just allign them on top of each other and it will look perfect in game.
    After adding base textures back, the foundation should be completely covered like this:

    When you're done with the LE you can mod your lot as usual.
    Important here:
    in order to avoid any Maxis foundations from showing change the foundation ID in your lot to 0x194B1000. as with the above method you need to finetune the values for maximum lot slope. Again, a good starting point is threshold value 8. This is the more important since with the building as a prop the slope can reach into the building if it's too steep, which will not like so nice You should be done!
    In the game it should look something like this:

    ___________________________________________________________________________________________
     
    Special thanks to Aaron Graham, c.p., callagrafx for their help
  15. nos.17 liked an article by rsc204, Modding Automata into Props   
    Have you ever wanted to use one of the in-game automata as a prop in lotting? Well it's actually really simple, all you need to do is create a prop exemplar that links to the installed automata model. You can even duplicate the model and make rotated versions. Unlike normal SC4Models, automata are special because fully 3D models are used in game.
     
    However to aid you in making automata as props, I've included here a template for the Bus Automata. I will use this as an example, and walk through the modifications required to make whatever bus automata you are using. But the principles explained here can be adapted to props for any S3D 3D model that you want as a prop. Note all models are S3D, but not all S3D models are the 3D ones.
     

     
    In the example above you can see the Basic Prop Exemplar for the default Bus Automata. The IID* of this model is 0x10620000. This is the same ID used in the Resource Key Type 0 field of the prop exemplar.
     
    *IID = Instance ID, as in Type, Group and Instance. For all 3D models the same Type and Group ID is normally used, hence we only need to worry about the Instance ID when dealing with these models.
     
    Any models which over-ride the Maxis defaults, must have the same ID as the originals. Therefore it's usually easy to know which IDs we are looking for. Vester has compiled a handy list of most Maxis Automata here.
     
    The example shown above references the default Bus Model. Without further modification, you can now use this prop to place your Bus Automata on lots. But in the included template DAT, there are a further 3 Prop Exemplars, linked to 3 S3D model files. These S3D files need to be replaced by duplicates of the actual Bus Automata you want to make into props. Since those included are merely templates.
     
    Copying your custom Bus Automata.
     
    These additional prop exemplars need to link to rotated models. At FAR-L, FAR-R and Diagonal positions. If you want to use these, you need to find the DAT containing your Bus Automata. Open that file, whilst keeping the included file opened as well.
     
    Copy the S3D of the Bus Model. Be careful to get the whole bus, not the model with the lights. Paste this below an existing S3D model in my file.  Right click the template S3D model and select "Copy Entry ID".  Right click the replacement S3D model and select "Paste Entry ID".  Right click the template S3D model, select "Remove File". We don't need this anymore.  
    So that's one S3D model replaced with your custom one. If you do it this way, all the prop exemplars and textures from the existing model are now automatically linked together, saving a lot of work.
     
    Repeat the process for the remaining two S3D templates. Save your modified file. You can optionally rename the Prop Exemplars to better suit your model.
     
    Rotating unique model instances with Model Tweaker.
     
    Now we need to rotate the models, because right now our copies are still straight. For this, you need Coego's Excellent Model Tweaker. Open the modified DAT file using Model Tweaker.
     
    Highlight the following S3D models in turn and use the Rotate Models option with the following settings for each:
     
    S3D IID 0x20620000 FAR-L        -    Counter-Clockwise / Free = 18.5 S3D IID 0x30620000 FAR-R        -    Clockwise / Free = 18.5 S3D IID 0x40620000 Diag             -    Clockwise / Free = 45  
    Now save the file. Your props will now appear in the Lot Editor for use. Bear in mind that such props may not show correctly in the Lot Editor. But they will appear in game, all four props link back to the original model's textures. So to use them, you must keep the file with the automata installed.
    BusAutomata_as_Props.zip
  16. nos.17 liked an article by blunder, Know Your Terrain: A simple guide to making the most of your terrain mod   
    To get started all we need is Ilive's Reader and your terrain mod of choice.
    Reader: 
    I'm using the .93 version of reader as opposed to the 1.4x just for multiplicities sake.
     
    Terrain Mods explained.
    Go ahead and fire up reader and open your terrain mod.  Depending on which mod you're opening, you will see a list of sub-files on the left.  Clicking on one of them brings up what's in that specific sub-file on the right.  I'm using Gobias' Sudden Valley terrain mod in this example, both because it's my favorite terrain mod and because it has the most files; making it the most intimidating terrain mod to tweak (but only on the surface).  So you should see something like this: (click for full)

     
    Every terrain mod will have at least 3 components: a DIR file, an INI file, and at least one Exemplar file.  We want the exemplar file that is the terrain exemplar.  When you click on the Exemplar file in the left box, the correct one will start with these three lines in the right-hand box:
     
    Don't worry about the other exemplars if your terrain mod has any, nor the INI file.  I'll give a brief overview of them later, but we won't be tweaking them.
     
    So, that big long list in the right hand box.  Yes there's a lot of stuff packed in there, but not all of it is useful to us.  In fact some of it is only barely functional.  You get a sense that Maxis had grand ideas with terrain function in the simulation, such as erosion, ground water, weather, and moisture simulation, but these were never fully implemented.  Many of the variables here control god-mode tools.  Others we won't be touching.  Here's the important variables for our purposes:
     
    1.  The snowline.*  The easiest way to control the snowline on your map's terrain is through two variable: MaxTerrainHeight and TemperatureRangeFactor.  Changing the textures in the INI table is also possible, but is not recommended for anyone except advanced users and is mentioned briefly in the terrain texture section below. 
     
    We'll talk about MaxTerrainHeight first.  First off, this variable absolutely, positively, MUST be higher than the highest point on the map that you are loading.  Trying to load a tile that has terrain higher than this value will cause the game to instantly crash.  Back in the old days, this value used to be 2000m.  Then as more dramatic real world maps started to be made this needed to be adjusted up, and so height patches were released that upped this to 5000m.
     
    The other value important for the snowline is TemperatureRangeFactor.  This effects the distribution of textures across your terrain.  It is possible to raise and lower this value to raise and lower the snowline accordingly, but this has the additional side effect of limiting the range of textures that appear at lower elevations too.  This could mean cutting out the detailed terrain textures that appear in limited areas and so it is not what i recommend to change your snowline.
     
    Instead i recommend changing the snowline through using MaxTerrainHeight only while leaving TemperatureRangeFactor at what the developer set it as.  Because every terrain mod is different, this will require some trial and error.  First you need the 'extracheats.dll' file from the STEX installed.  Then you need to enter a tile you want to have the snowline on.  Enter mayor mode (create city...) and call up the cheat box with 'control-x'.  In the box type terrainquery and hit enter.  This adds some geometric info to your query tool-tip.  The y=value is the height, in meters, of the terrain at that point.  Write this number down, exit the game, and go back into the terrain mod in the reader program. 
     
    Remember we said each terrain mod is different, so this will take some trial and error.  Multiplying the value you just wrote down by 3 is a good starting place, so do that and enter it in the MaxTerrainHeight (and remember that this has to be higher than the highest point on your map).  Now you will have to go into and out of the game to check the results and adjust it accordingly.  If you have lowered the MaxTerrainHeight as far as you can (the highest point of your map) but still want a lower snowline, now you should start lowering the TemperatureRangeFactor in small increments until you achieve the desired results.
     
    Blunder's preferred settings:  TemperatureRangeFactor: leave at the default unless necessary.
    MaxTerrainHeight:  Again, this will vary depending on your map and your taste.  If your map has tall mountains, it will typically end up just a couple hundred meters taller than your highest point.  If the elevation is just small hills, it will probably be about 2x to 2.5x the elevation of the hilltops. 
    Good job: you can now throw out your Terrain Height Patch.
     
    *Some mods don't actually have snow, so this obviously won't work with all terrain mods.
     
    2.  MaxNormalYForCliff.  Max what for what?  This is the variable that controls whether or not the texture you see on each tile comes from your rock mod or your terrain mod.  The LOWER this variable is, the STEEPER your terrain must be before it is given rock texture instead of terrain texture.  This may sound counter-intuitive but it's because a 'normal' -like in the variable name- is a vector orthogonal to the tangent plane of a surface and... ok never mind i'll just tell you what you should do with this.
     
    If you use a 15m Diagonal Jagged Edges Mod (DJEM)and you are perfectly happy with that, you can set this to .77 and just walk away.  If you aren't familiar with a DJEM, it makes the terrain 'snap' to a nice line when making diagonal cliffs of a certain height; very useful for sunken highways and raised transit networks.  If you want to use a DJEM for 7.5m overpasses if and when the NAM team manages to fully implement that system then the value you want is .95.  Please note however that this comes with a huge trade-off where even the gentlest of slopes will become entirely rocky.  Not recommended unless you're building on a map that is flat as Holland.
     
    Also note that just using .77 (the 15m DJEM value) does not look the best on hilly and mountain areas.  It creates inconsistency in where the rocks appear and makes your terrain look weird; especially mountains.  So for mountain areas i like to use something between .60 and .65.  It really depends on the specific geology of your map.
     
    Here's an example of how this changes the look on your snowy mountains.  This first shot is a screen of Mt. Shasta with the MNYFC set to a standard .77.  Notice how there are square edged rocky splotches on slopes that shouldn't have a rocky outcropping. (click for full resolution)
     

     
    Notice what happens when we drop the MNYFC from .77 to .65
     

     
    See how the rocky outcroppings shrink in size, not distracting from the snowy slopes.  This also makes it easier to remove unwanted rocky slopes with some judicious and very light usage of the 'smoothing' god mode tool.
     
    Blunder's preferred settings: .77 for flat land and .65(ish) for mountains.  Congratulations, you can now throw away your DJEM patch.
     
    3.  The Beach!  Who doesn't love a good beach?  There are actually two variables that control this, and they're almost at the bottom of the right hand box: MaxBeachWidth and MaxBeachAltitude.  Think of these two variables as forming a box.  One bottom corner of the box is anchored to the waterline.  The value for MaxBeachAltitude is the height of the box in meters.  The value for MaxBeachWidth is the width of the box, in number of tiles.  Any tiles that fall within this 'box' are assigned a beach texture instead of a terrain mod texture.
     
    You will also notice there are several variables for shore cliffs in the terrain mod.  I recommend just leaving these alone as they seem to influence the moisture simulation more than the terrain/rock texture.
     
    Blunder's preferred settings: width=5, height=3
    Really though, you should play around with this to suit the effect you're going for and the map.  These values are best for real world maps.  For hand-terraformed maps you will probably need to significantly jack up the height.
    Congratulations, you can now throw away your endless beach mod.
     
    4.  Water.  Jumping back up to the top of the list we have two more variables: WaterMinAlpha and WaterDepthForMaxAlpha.  These two variables are the boundary conditions to establish a gradient in how transparent your water is. 
     
    Waterminalpha is the transparency at the surface on a scale of 0-255 where 0 is fully transparent and 255 is fully opaque.  You need to achieve a balance here.  Too transparent and you can't easily tell where the water starts.  Too opaque and you really notice all the graphical absurdities that the game creates where the water meets the shore. 
     
    WaterDepthForMaxAlpha is at what depth the water reaches an alpha of 255 (fully opaque)
     
    Together these two variables establish a gradient of water transparency and offer the user a huge variety in achievable effects.  Want a pristine alpine lake where you can see to tremendous depths?  You can do that.  Want to replicate the murky amazon where you can't see a piranha a foot away from you?  You can do that.
     
    Both of these variables will be subject to changes depending on which map you're using and how the creator went about making the water on the map (e.g: what the artificial underwater terrain looks like.  And it is artificial, the satellite data available to us map makers does not allow us to replicate underwater terrain.  it's all hand-crafted)
     
    Blunder's preferred settings:  WaterMinAlpha: between 32 and 75.  I typically use 50.  WaterDepthForMaxAlpha: again terrain dependent but between 12 and 32.  I typically use either 16 or 32.
     
    *Note: if you are using sorchin's water flora it must load before your terrain mod.  He included a copy of the terrain exemplar in his mod with modified values for water transparency.  So if his water flora is loading last you will see it's water transparency values instead of your terrain mod's.
     
    Here's a pair of screenshots that show the last two points in action.
    Screen one is near-default settings for Gobias' SV  for both water and beach but with a darker water mod installed.  Notice how the shore appears pixelated and has a narrow beach (grid left on for reference purposes).
     

     
    Here's what happens when we change the default settings to my recommended settings.
     

     
    You can see the jagged effect along the shoreline is much reduced, although still present, and we have a nicer looking beach.
     
    We can also increase the beach width higher.  A value of 10 tiles with the same height gives us this:
     

     
    Welcome to the pacific.
     

     
    *4b.  Sealevel:  It is possible to change the sea level in reader.  For the basic user this is not recommended, but if you want to simulate a flood to take pictures of for your CJ this can be fun.  Default is 250.  Really advanced users can use this to tweak the appearance of their beach if erosion is enabled.
     
    5.  Miscellaneous Values
     
    There are a number of other things you can tinker with in the terrain properties exemplar.  Here are the minor variables:
    Unwatered Terrain Color
    Unwatered Building Color
    Watered Terrain Color
    Watered Building Color
    Yup, you can change how things look in pipe view.  Not that you want to spend any more time than necessary in pipe view, but tinkering can be fun.  Each of these are variables have 4 values: one for each segment of the RGBA color.
    VolcanicAshLifeTime.  Time (in microseconds) volcanic ash remains visible when you use the volcano disaster.  Can be entertaining for a couple minutes. /shrug
    There are a number of variables related to the God Mode tools that you don't really need to touch.  These will be self evident by their names.
     
    6.  A word about terrain textures
    As mentioned before, the actual assigning of textures from the terrain mod to the city tile can be a complex process.  Tinkering with this is something best left to the pros, so if you really want to dive into the subject i suggest you track down the threads by Lowkee and Gobias at sc4devotion to dig in depth.  This is just the briefest of overviews.
     
    Much like the 'tree table' in a tree controller, the terrain mod contains a 'terrain table' and can be found in the INI file.  Like the tree controller it is 16 rows (elevations) by 16 columns (moisture). 
     
    The moisture is a complex formula of slope, orientation (north and east facing slopes are drier, south and west ones wetter) and controlled by values in the Weather Tuning Parameters exemplar as well as proximity to water in the terrain exemplar.
     
    Elevation rows are 16 evenly distributed segments between the Min Height and Max Height properties. 
     
    Each texture has a set of spread curves, or blending functions, for each zoom.  You'll have to check Gobias' thread for more info on these, since I've never experimented with the blending curves and tiling factors.
     
    If you really want to experiment with terrain textures, then i wish you the best of luck.  But, again, you should go look at Lowkee's and Gobias' threads for more (and much better) info since they're the pros.
     
    7.  HD Terrain/Rock/Water/Beach mods
     
    Here's a handy link list for all the HD terrain related mods out there as of writing this article:
    Terrain:  (terrain mods may include their own rock, water, and beach mods which can be individually removed in favor of others) also be sure to grab their separate texture dependencies.
    Gobias' Sudden Valley.  IMO the best terrain mod currently out, and what i currently use.
    Gobias' Berner Oberland.  Designed to imitate the swiss alps, this terrain features more vibrant greens, making it more challenging to use.
    Lowkee's Appalachian Terrain Mod.  The first truly great HD terrain mod.  The browner tones make green flora really pop out (see Paeng's Mountainview CJ for glorious examples).  Separate rock/water/beach plugins for it here. Search the LEX for Mac installer.
    Pyrenean Terrain Mod. Possibly the first HD terrain mod.  Also my least favorite; does not blend as well with flora as the others.
     
    Rock:
    Shokthrpy's HD Rock mod pack.  5 Rock textures to choose from.  I especially like #1, also #3 blends superbly well with Lowkee's Appalachian Terrain.
     
    Beaches:
    Gobias' HD beach pack 1.  Feature 4 beaches to choose from: Nantucket, Cape Cod, St. Lucia, and Vancouver Island (which i currently use).
     
    Water:
    Shokthrpy's Brigantine 2.0 HD water.  Based on the wave pattern of Pegasus' Brigantine water, also called 'the holy grail' of water mods.  Shok has translated the wave pattern up to HD standards and included a range of colors to choose from.
    Gobias' HD water packs 1, 2, and 3.  Each pack has 3 custom water types.
    Drunkapple/dobriver's water packs 1, 2, and 3.  Each contains 6 water types to choose from.
     
    8.  Other
    Credit where credit is due:  I learned most of this stuff by looking at Ennedi's work in his Ennedi Plays Shosaloza CJ
    And then started doing my own tinkering.  Most of this really isn't anything new, i just felt there was a need to consolidate the information to make it readily accessible to the newer generation of mayors.
     
    As always a huge thanks goes to the crew at simpeg for all their help and support.  Also mad props go to all the custom content creators that make such beautiful toys for us to imitate nature with.
     
    ~Cheers,
     
    blunder
  17. nos.17 liked an article by TMTS, How to: Cars appearing in all cameras OR disappearing completely from view (better perfomance). And more about graphicrules.sgr   
    NOTE: The traffic will be processed normally. The changes are only visual.
     
     Viewing cars in all cameras, the same for pedestrians, is a good resource for better picture taking, useful for video creating and make your city appear more alive. The cars will appear very small on the maximum altitude camera, which make this just a detail. But for SC4 everything is about detail, right? However, it will make your game heavier in high altitude cameras.
     
    On the other side, you can turn off all cars and pedestrians from appearing, without ruining any other graphic options, which is good for better perfomance, but bad for pictures.
     
    I had included a picture as attachment but when the vehicles are not in motion, they are very hard to notice and I dont know how to create GIFs on big resolutions (if someone can do this please post on the comments with an example).
     
    Ok, let get this done:
     
    1) Go to your maxis Program Files folder (for example, mine is C:\Program Files (x86)\Maxis\SimCity 4 Deluxe).
     
    1.1) Find your way to open the step 2 file with the notepad. If you already know how to do it, skip steps 3 and 4.
     
    2) There is an archive called graphicrules.sgr, it can appears as "Graphic Rules" SGR archive type. If it is not there, it might be hidden. If you have just installed but never had run SC4 you wont see the file. You must had start the game at least one time to see it.
     
     

     
    3) Select the file, then right click on it. Select the an option called something like "Open with" or "Open As" or similar ( my windows version is brazillian and the message in portuguese is "abrir como").
     
    4) This screen below will appear. You have to select the notepad (the icon is a blue notepad). If it doesnt appear, you will have to look for it on the windows. If you dont know how to do that there are more detailed tutorials about it on the net, just google something like "How to Open with NotePad".
     
     

     
    5) Now open the file.
     
    6) Surprise!  Not encripted. You will see several options. The first phrase you should see is "property groups for options set via the UI", with several # coming before it.
    NOTE FOR ADVANCED SC4 USERS: I had not explored all things and stuff graphicrules.gsr can do. There are some stuff that can be explored that are not on this tutorial.
     
    7) Look for:
    "optionGroup $CarsSims
    # Sadly, we have no off"

     
     
    What graphic options do you use on SC4? It all depends on it. Normally, everybody use high. Notice that for this to work you must know which option is selected for "Car Sims" or related.
    8.1) If you want to make cars and pedestrians appear on all views, set "property minVehicleZoom" and "property minPedZoom" as 1.
    8.2) If you want to make cars dissappear completely from view, set the same options from 8.1 as 6.
    P.S. : There is an unconfirmed possibility that your SC4 is inverted on this rule compared to mine. For example, your camera "1" could be my camera "6".
     
    9) Now save your file. It is recommended to have a backup of this, however, most SC4s will re-write this file automatically if it is not on the folder.
    You probably be forced to "Save As" option and, when trying to replace the file, get "Access Denied" message. If that happens, move your old graphicrules.gsr to somewhere else then save the version you opened and edited with the exactly file name and make sure the extension keeps the same.
     
    10) Open your SC4 to notice the changes. Everytime you edit this file you must restart SC4 to apply the changes.
     
    FINAL OBSERVATIONS
     
    I had not patience to explore this archive entirely and explore all its potentials. Be free to do yourself and to share your discoveries on omnibus and/or in the comments section.
  18. nos.17 liked an article by BLANKBLANK, A Brief Introduction to Diagonal City Building   
    A brief introduction to diagonal city building

    So from time to time I will post some walkthroughs/explanations about creating realistic/beautiful/interesting cities. It's nothing lengthy, just simple tips and ideas. The first one is a rather nasty area of the game- diagonals.
     
    {---}
    1.

    Every player wants to gridbust- build in directions other than up, down, left and right. Vanilla SC4 only has orthogonal buildings, parks and fillers. Now the game has diagonal roads and the Network Addon Mod (NAM) has enabled players to go into FA (Fractionally Angled) territory, but the diagonal BATs and LOTs have not kept up with the various orthogonal options SC4 presents. It is possible to create several diagonal areas in a large city tile without it becoming repetitive. Ideally a city should feel like it is going in eight directions, not just the usual four.

    What about FA? I have only seen a few dozen FA BATs and LOTs. If you think incorporating realistic diagonals in a city is hard, then try exploring the dark art of FA design. It's something only the most skilled SC4 players use and very sparingly because the FA options are tiny.

    For now though let's focus on this rather nasty diagonal area. Adding in orthogonal buildings when there are diagonal roads and wide curves would look ridiculous. It's all very well laying down diagonal roads but without the means to incorporate them into the city, and masking the jagged diagonals (see the top left of the picture), then one should may as well stick to the grid in urban areas. Fear not though, there is a way to make diagonal areas look smooth, flowing AND connect with the orthogonal areas of the city.

    Note: I keep saying orthogonal, it just means right angles, or for SC4: up, down, left and right directions.


    2.

    For starters clear the area, get out the grid and start counting the width of the diagonal area- number of squares. I've found that a diagonal building on its own, complete with a back-door filler, takes up two squares/tiles of width. The thinnest diagonal city block is three squares in width. Finally, to bound a diagonal building between a road and some kind of barrier takes between two or three squares width. Note: technically two rows of diagonal buildings, which don't connect, could be considered a city block. However, I've found it usually looks pretty weird.


    3.

    This is really important because to complete a diagonal area one must know how much space there is available. There is nothing worse than demolishing the diagonal buildings because there was not enough space; it means many lost minutes as many inner-city diagonal buildings are scattered throughout the landmarks menu.


    4.

    Having laid out a street template I have gone ahead and plopped in most of the Wall-to-Wall (W2W) buildings for this area. Fuse orthogonal with diagonal buildings, this really does give the impression that the city extends in eight directions/angles. I have compiled a small list of diagonal buildings, one link for each diagonal BATter. But that's all fine and dandy; what will stop the buildings not connected to a road from becoming abandoned?


    5.

    The answer to this is pedmalls. Just one pedmall next to a building and it will never become abandoned. I don't believe this will work for residential buildings though, the Sims need to access the road network to find a job. Connected pedmalls though will ensure a connection. In the middle left you can see the pedmalls in action. For the player just starting to use these pedmalls I will say this- you will see that Maxis white pavement texture. I use a sidewalk mod and Paeng's pedmall parks to bring the sidewalks to life. A word of warning about pedmalls- when you plop them next to streets/roads the sidewalks will not appear. Plop any lot or building, on the other side, to make the sidewalks appear.

    Another consideration is the jagged texture tiles of the street. Do you want grass or pavement? Pavement works best for inner-city areas. But plopped buildings always cause the street to show jagged grass textures. Worse still, if you want to expand the pavement with pedmalls or diagonal pavements, it will only reinforce the jagged appearance. Here I will let you in on a little secret- the NAM has the SAM (Street Addon Mod). The SAM contains two streets which will always have jagged pavement textures: SAM 6 (cobbled streets) and SAM 10 (Japanese Moonlight textured streets). I use these streets often for diagonal inner-city areas. In this picture I used SAM 6. But a word of caution- use SAM 6 sparingly because cobbled streets imply old areas; pre-20th century and older. Think of the Old World and Europe, think of narrow streets and pre-modern architecture. I am building an American-styled city and I have used the SAM 6 sparingly because cobbled streets in American cities are, I believe, rare to see.


    6.

    Fillers are important for making the area behind these diagonal buildings look convincing. Diagonal buildings often come with 1x1 lots which have a variety of textures. SFBT's diagonal pavements and pedmalls can make the appearance of these back areas more uniform and consistent. I will be applying two layers of diagonal fillers: 1. a half pavement/half grass lot and 2. a half forest/half transparent texture with a fence running through the middle. This will give the appearance of the area being closed off and mark a clear separation between building, road and whatever else borders the area.


    7.

    In the bottom middle of the picture I improvised together a park since I was running out of space. I even snuck in some FA! I would say that this area has been reasonably filled in, fits in smoothly with the bordering roads and looks like another part of the city. But a special part because it is a diagonal area. Additionally the FA pavement, the numerous diagonal roads/rails and the curving highway all create the impression of grid-busting. In the area I filled can you see any jagged diagonal edges? THIS is an example of a seamless diagonal area.

    This was a small area about two hundred squares worth. This took me roughly 45 minutes to complete. For someone starting on diagonals for the first time it will take a couple of hours. Diagonals are rather tricky to get right, it does not help that the selection of diagonal fillers and BATs is far smaller than the selection of orthogonal fillers and BATs. Finally, to conclude, I recommend the following method for constructing diagonal areas:

    1. Work out the width of the area.
    2. Place in the necessary streets.
    3. Plop in the buildings; be that diagonal, orthogonal and diagonal/orthogonal transitions (BATs which are as rare as gold dust).
    4. Add in pedmalls and consider using SAM 6 or SAM 10.
    5. Infill diagonal blocks with trees/pedmalls/fillers/concrete/paths/parks/car parks. The fillers can be a mixture of orthogonal and diagonal.
    6. Extend the back area of a diagonal row of buildings with diagonal fillers, lay in at least ONE diagonal layer and then choose between further diagonal layers or extending the back with orthogonal fillers such as trees, grass tiles, etc...
    7. Fill in spare space with either more buildings or parks or something unique. Be creative with how you fill in empty squares.
     
    {---}
    List of goodies:

    Diagonal buildings:
    xannepan's content- http://sc4devotion.com/csxlex/lex_filedesc.php?lotGET=1613 (LEX).
    Glenni's content- http://community.simtropolis.com/files/file/22357-transition-from-long-to-short-diagonal-buildings/ (STEX).
    prepo's content- http://sc4devotion.com/csxlex/lex_filedesc.php?lotGET=1324 (LEX).
    Ferox's content- http://community.simtropolis.com/files/file/18809-diagonal-euro-buildings/ (STEX + his other files are largely W2W).
    zero7's content-http://sc4devotion.com/csxlex/lex_filedesc.php?lotGET=1174 (LEX).
    Paeng's gridbusting warehouses- http://community.simtropolis.com/files/file/27701-paengs-gridbuster-warehouses-vol01/.
    Motokloss's content- http://community.simtropolis.com/profile/422335-motokloss/content/?type=downloads_file.
    Reddonquixote's content- http://community.simtropolis.com/profile/68861-reddonquixote/content/?type=downloads_file.
    --Quite a few of his buildings have diagonal versions of them.
    Darknono35's content- http://community.simtropolis.com/files/file/29566-nybt-605-third-avenue-ny/.
    SimCity Polska links: http://www.simcitypolska.pl/index.php?action=downloads;sa=view;down=47, http://www.simcitypolska.pl/index.php?action=downloads;sa=view;down=145 and http://www.simcitypolska.pl/index.php?action=downloads;sa=view;down=83.

    Fillers:
    SFBT diagonal filler lots http://sc4devotion.com/csxlex/lex_filedesc.php?lotGET=1197.
    MGB - diagonal fillers http://community.simtropolis.com/files/file/29797-mgb-diagonal-filler-set/.
    T-Wrecks's IM IRM filler set - http://community.simtropolis.com/files/file/28298-industrial-revolution-mod-i-m-filler-set-1/.
    Diagonal industrial fillers- http://community.simtropolis.com/files/file/27699-nightowls-diagonal-industrial-fillers-and-extenders/.

    Bonus:
    Paeng's Pedmall Parks- http://community.simtropolis.com/files/file/26454-paengs-pedmall-parks/.
    The latest NAM (more support for SAM 6 and 10).
    RRP Wooden Fences- http://sc4devotion.com/csxlex/lex_filedesc.php?lotGET=1888.
    KOSC diagonal parking- http://community.simtropolis.com/files/file/30953-kosc-sp-modular-parking-diagonal-set/.

    AND Gobias' sidewalk mods. NOTE (29/04/2017): The administrators of the BSC LEX have restored Gobias' files: http://sc4devotion.com/csxlex/lex_filedesc.php?lotGET=2850.

    PLUS grab the rest of T-Wrecks IRM fillers and while you are at all of his IRM files.

    FINALLY- If you are a real die-hard then type in "diagonal" into the LEX and STEX searches. Scour these exchanges and nab everything which says diagonal. It will probably take several hours but the reward of more variety is always worth it.
    {---}
    Additional content (edit- 16/04/2017)

    Simcoug's R$$ Diagonal Homes:
    Simcoug's Diagonal W2W Tenements:
    Rivit's RUM-http://community.simtropolis.com/files/file/29279-rum-for-rrw/.
    --This is for transparent railway textures.

    MGB - Terrain Grass NAM (TGN) for Gobias Berner Oberland- http://community.simtropolis.com/files/file/30159-mgb-terrain-grass-NAM-tgn-for-gobias-berner-oberland/
    --Replaces all the road network grass textures with the Berner Oberland styled grass. There is also a Sudden Valley, Appalachian and Pyrenean version of this mod to.

    Selecting the base texture replacement option for the Berner Oberland, Sudden Valley and Appalachian terrain mod installers. This goes hand-in-hand with the TGN. For Berner Oberland and Sudden Valley you can find them on the LEX.
  19. nos.17 liked an article by SimCoug, Making lots water compatible   
    1)  Using ILives Reader, select the lot exemplar file ... you should see a screen similar to this what you see below.
    In the empty space below, right click with your mouse and select 'add property'

     

    2)  In the pop up box, select 'LotConfigPropertyWaterCompatibility' under the 'name' field.

     

    3)  In the 'values as text' field near the bottom, type '1', then push the first 'apply' button, then the next 'apply' button.

     

    4)  You should see a new property under your lot exemplar.



    5)  Finally, under the 'sub files' tab, select the 'ReIndex' option, then again under the 'sub files' tab, select 'Rebuild Directory File'. 



    6)  Last but not least, save your file (or save as).   
    Fini!!
  20. nos.17 liked an article by NMUSpidey, STEX 100,000,000 DLs Interview with bixel   
    SimCity 4 is a game that appeals to people living all over the world who want to build cities in wildly differing styles. Some have added content to enhance American-style building all the way back to colonial times. Others have created BATs for building classical European towns. Our next interviewee helps to make this possible with his incredible Hong Kong BATs. bixel's buildings are essential downloads for making any city with a hint of East Asia. They are what rice is to fried rice. They are what Peking duck is to Peking duck. They are what bell peppers and beef are to bell peppers and beef. Anyways, let's give a warm welcome to bixel!

    ST: When did you first get SC4, and what do you remember about your first experiences with the game? Was SC4 your first involvement with SimCity, or did you already have a history with the sim games?

    bixel: I think it was 2 years after SC4 was released. It was actually browsing the internet on SimCity 3000 modding that got me to purchase Simcity 4, and through that of course lead me to simtropolis.

    ST: What aspect of SC4 do you enjoy most – what keeps you coming back?

    bixel: The aspect to SC4 which extended the play-ability was actually [url="http://go.simtropolis.com/6242628/http://www.simpeg.com/forum/index.php?action=downloads;sa=view;down=6"]Sim Peg's Garabage Chute!!! Without this mod, SC4 was similar to the earlier versions of the game, chasing down fires, fixing water problems, etc etc. While it is always a good method to keep players engaged with random scenarios I don't think SC4 would have been able to evolve into the "City Garden Building" game, which I feel is what the community actually uses SC4 for. Hence, city diaries and hours and hours of ocd-like city pruning and beautifying that we enjoy.

    ST: Do you recall the first plugin you installed?

    bixel: The 1st plugin were the official ones, like South Koreas 63 building.

    ST: What led you to Simtropolis at first? Can you remember your initial impressions of the site?

    bixel: That thirst for more buildings led me to Simtropolis to download more.

    ST: Describe your progression into the world of SC4 custom content. Was it a particular lot or BAT that inspired you to take the first step?

    bixel: NDEX plugins were, by far, the biggest influence. I had by then been learning 3DS Max and had been playing with the BAT at the time, so I felt I was ready. I wanted to do something NDEX-y but since commercial-office buildings were being made by several power artist groups I decided to try my hand at residentials.

    ST: Speaking of first steps, what was the very first thing that you modeled using the BAT? Do you still have a screen shot?

    bixel: The 1st release was a terrible, terrible residential skyscraper called the Liberte. It was very tall and pretty ugly, but had some detail that appealed to some users. This encouraged me more to release better and do better. It went through 3 versions I think in over 4 years. [NMUSpidey: Here's a link if you're curious.]

    ST: Your list of uploads is populated entirely by Hong Kong buildings. Are there any particular reasons for choosing to direct your efforts in this direction? Are they based upon real buildings, or are they true-to-life recreations?

    bixel: Since I was committed to adding much needed high density residentials to the game, I needed to find a style that was both realistic and exciting to look at. I had a couple of attempts of making fantasy buildings but they were ugly, so I used the internet to find inspiration. Right away I found Skyscraper Diagrams website and Hong Kong is the 4th featured city of architectural drawings. I chose HK because it was not Chicago or New York, which I felt the content was already saturated.

    ST: Most of your BATs are released under the HKABT banner. For those of us who may not know much about the Hong Kong/Asia BAT Team, can you elaborate on what your role with them was?

    bixel: Once I latched on the HK style, immediately my work improved and I met some friends through my work and other HK content that was being uploaded. Particularly Paul v. Montfort, Simfox and T-Wrecks. Paul and I formed the team and quickly gained some very amazing talent to help us populate the game with some visual style and content. My main role was simply encouragement and teaching some skills and methods when needed.

    ST: I think most custom content creators would consider their work a hobby, but like anything in life, some parts are more fun than others. What do you consider your least favorite part of the BATing process? Your favorite?

    bixel: When it comes to making content for Simcity 4, it is very different from making content for almost any other game. Simply because SC4 is NOT a 3D game but very cleverly uses images rendered at fixed angles to create an illusion of 3D, the camera is orthographic at preset angles. Because of this you must render your building at all 5 zoom levels at 4 different directions. For large buildings this can take hours, and if your lighting is bad, you have to render it again. My biggest projects were so huge I had my PC running for 2 days! By far the rendering process is the most tedious and stressful for me. Simply modelling the building gave me the most joy.

    ST: You released your first BAT in 2005. Is there any one of your creations that you are particularly proud of? Are there any fun stories or facts relating to some of your works that we don’t know about?

    bixel: For a short while I had many dedicated followers in HK sending me photos of buildings when I asked for them. They were very enthusiastic and would travel to many different locations to snap a few photos. Several times they would reply that they live in the building and where overjoyed to see them in game. That meant a lot to me and I was glad to bring them such joy.

    ST: Has your experience BATing had any influence on your personal or professional life? Are there any skills that you have developed over your BATing career that have helped you beyond the world of SC4?

    bixel: Making 3D custom content for SC4 has definitely allowed me to acquire new skills and land me some pretty interesting jobs. I think game modding is really a good starting point for any hobbyist looking to increase their skills and enter the industry. Counter-Strike is still one of the most played multiplayer games and it was a mod, same with DOTA.

    ST: What advice would you give to a new member of this community who was planning on creating their first BAT?

    bixel: My advice to anybody wanting to make content for SC4 or any 3D game is to watch and learn from Lyndia tutorials. I learned by myself and I picked up some very bad habits that are hard to get rid of. The worst is modelling solely from splines... because of that I would have to re-train myself to do anything other than a box. I can't do characters or curves at all! Broaden your ability to work in different platforms, Modo is very popular now as well.

    If you want to do more than just SimCity 4 seriously consider sharpening your UV-Unwrapping skills, upcoming generation games like Cities Skylines are different from the way they did things for SimCity 4. It will also help you find a job in the industry.

    ST: Simtropolis is organized into ‘player’ and ‘builder’ categories. Regarding the ‘player’ section, do you have any favorite CJers that you enjoy following? What are your favorite SC4‘scenes’ (i.e., towering metropolises, urban sprawl, rural landscapes, etc.).

    bixel: I don't follow any CJs but I do check them from time to time for inspiration and how to use NAM effectively . My favourite CJs are of course the HK re-creations and stuff with a lot of clever train and public transportation schemes.

    ST: On the ‘builders’ side, do you have any favorite BATers that you enjoy following? If you still play SC4, what was your most recent download from the STEX?

    bixel: Most BATs I download are Euro/Asian style. I have no idea why but I can't do NY or Chicago stuff. I also am keen on parks and city beautification sets. I think there are many new content makers out there that have greatly increased the quality of output thanks to members ability to help each other and of course Simfox's BAT tools.

    ST: SimCity 4 has been out for over 12 years now. Are you surprised that this community is still going strong all these years later? What do you think is the secret to its longevity? Do you think there will still be new content being created 12 years from now?

    bixel: I am NOT surprised SC4 has lasted this long. This game appeals to young and old and is also casual and OCD (Obsessive–Compulsive Disorder)(like Minecraft) at the same time. It is such a great game. Additionally, I don't want to get too socio-economic here but SC4 is able to expand with new players with an old PC or laptop, they don't need to spend $2000 on a new rig. For this reason i expect to see more people playing in many different parts of the world. New content in 12 years? Sure, SC4 still looks great, and the skills of the custom content makers have surpassed the default content.

    ST: Are there any games you play besides SC4? What other hobbies do you have away from BATing and SimCity?

    bixel: My biggest hobby right now is programming games, hopefully I will mature to an indie developer! games I find myself playing mostly are Guild Wars2, Hearts of Iron III, and World of Tanks. I also enjoy small indie games like FTL. I'm really looking forward to Cities: Skylines. I have been following the dev guys closely and I will be making content for it.
  21. nos.17 liked an article by SimCoug, 100 Million STEX DL: An Interview with Heblem   
    ST: When did you first get SC4, and what do you remember about your first experiences with the game? WasSC4 your first involvement with SimCity, or did you already have a history with the sim games?
    Heblem: My first contact with SC4, was in the coming months after it released in 2003. My father bought me a copy in a Sam’s Club store because I got good grades in school (I was 13 back then). My experience playing the game was mixed, I wasn’t really satisfied with the original SimCity 4 compared to SimCity 3000 due to its limited flexibility in modding. Later in 2005, bought the expansion pack Rush Hour and my experience with SC4 changed due the ability to make more transportation options and custom content.
    My first overall contact with SimCity was in 1994 when SC2000 came out for SNES, I received it as Christmas present. Ever since I was a child I loved to make cities with cereal boxes, toy cars, Legos, Hotwheels and such. But honestly the only SimCity I have enjoyed most was SimCity 3000.


    ST: What aspect of SC4 do you enjoy most – what keeps you coming back?
    Heblem: Actually what I enjoy most is the ability to make huge cities in regions in a relatively short time, something impossible in recent games or other program/engines, as well as the endless possibilities using custom content. What gets me back, honestly, is all the hard work done in last 12 years of custom content.


    ST: Before we jump into the all the custom content questions, I’m curious… what is your favorite Maxis lot/BAT?
    Heblem: My favorite Maxis BAT is Chrysler building, due how it was detailed, and its correct size in game. Even today, over 12 years later, no one has made a better Chrysler building to replace the original one. That BAT helped me once in making The New York Times building, to compare both buildings in game, since in RL both buildings are similar in height, only about 2-5 meters of difference.


    ST: Do you recall the first plugin you installed?
    Heblem: Honestly can’t remember, however my first experience with custom content was looking for how to install custom maps.


    ST: What led you to Simtropolis at first? Can you remember your initial impressions of the site?
    Heblem: My first contact with Simtropolis was in 2005, after I found out I could install such buildings into the game. The first sites that I visited looking for custom content were the original Simcity exchange, the Spanish SimCity forums (CSC), and of course, Simtropolis. I only used those sites to download (but not for forums or collaborate). My initial impressions of Simtropolis were great, since its exchange was much better than the EA exchange. Later in 2006, I finally register to forums, to show my city creations (city journals) and my first BAT.
    This is the only image I found of me using Simtropolis in 2006 as Hableurg account.



    ST: Describe your progression into the world of SC4 custom content. Was it a particular lot or BAT that inspired you to take the first step?
    Heblem: The creations that inspired me to BAT were the lots and BATs made by SimGoober. I loved how realistic and detailed those are, and they made my city look more alive and suburban themed. However it wasn’t until one year later that I made my first BAT.
    At first, I looked at how to install custom maps, and then realized I could easily make my own custom maps by just editing the PNG grayscale file as my desire. Later, I saw in the forums how people make great buildings using the BAT tool. Initially I thought it shouldn’t be too difficult, because in SimCity 3000 the BAT tool was easy to use and from there you could easily put your own custom buildings into your city, which was something I often did in SimCity 3000. I decided to give the same effort to creating SimCity 4 buildings, however I was disappointed at first because the SC4 gmax BAT tool was too different than the SC3000 BAT.
    My second try in gmax BAT was in 2006, after looking at tutorials in different sites on how to do BAT modeling, lighting and export, and finally came up with my first creation, but never uploaded it.


    ST: Do you remember what the very first thing that you modeled using the BAT? Do you still have a screen shot?
    Heblem: The first thing I modeled was what I been instructed in the BAT tutorial, which basically is this (only image I found of it)

    But as for my own, could be this office building, never released it due it poor aspect.

    Later my first BATs released at STEX were the and a (under Hableurg account, which lost password long ago)


    ST: You were one of the founding members of the LBT (Latin American BAT Team) which produced a wide range of very popular BATs for the SC4 community. How did that collaboration come about, and do you still keep in contact with anybody from the team?
    Heblem: The initial goal and idea was to create custom content from Latin America, which were non-existent at that time. The team was set by Berethor07, Tcxalapa and VictorGonzales at CSC forums in doing BATs themed from Latin America. Later, Debussyman, and a few others joined. The original idea and founder was Berethor07, who made some interesting landmarks from Mexico City, myself and Berethor. Initially we teamed up for MBT (Mexican BAT team), later VictorGonzales joined and suggested we change the team name to LBT, due to the fact that he was Venezuelan. The main project idea was to change every SimCity maxis growable to look like Latin American slummy homes, but as of today, we actually never achieved our goal. The proposed project is still getting dust in my computer. However, buildings models such as homes, department stores, offices, and commercials packs are available on STEX without lots since 2009.
    Unfortunately as today I haven’t hear anything from Victor Gonzales nor Berethor07 since 2009, currently sometimes I still in contact with tcxalapa.
    Since 2009 I rather do creations by my own under HBS tag, which it’s a shorten name of Heblem’s, Heblem, my real name Eblem, H for Henry, Henry Eblem.


    ST: You created a number of very popular BATs, including the Treasure Island Casino, the Super Walmart, and many other famous retail outlets, but your has proven to be one of your most popular creations. Did you ever expect flora props to become such a big hit with the SC4 community? That pack also contains plopable sand/dirt – I don’t think that had been done before, so what gave you the idea to create such a versatile MMP?
    Heblem: I didn’t expect so many people would use my ploppable sand/dirts. When I made those for a tropical region, I was looking for something that could decorate missing details over the repetitive texture pattern of the terrain mod. My first thought was to use alpha textures as BAT/props, which was a great idea to implement. After testing it myself, I then had the opportunity to share it (I still have some other ploppables for my own personal use). Thankfully, with those MMP’s I could make realistic SC4 landscapes like this one:

    Many of these props are by my own, including the creation of new terrain mods, water mods, rock mods. Many extensive tests were conducted in mid-2009, but as of now I haven’t gone back to that topic. However, my future MMP (not released) project will be a different set of MMPs that can recreate different earth biomes. I am still considering making more in the future.
    But overall my most popular and detailed BAT that I have ever made was the New York Times building, which took 2 months to create and as of now has over 30k downloads.


    ST: Your BAT library is very extensive, but you also managed to create a number of terrain and rock mods, maps and even a stoplight replacement. Many BATers like to stick to what they know, so what motivated you to step out and try your hand at other types of SC4 mods?
    Heblem: Well, most of my motivation in doing different things comes from what I see that’s missing in game. For example, one day I wanted to recreate a So-Cal city (Southern California), but the only stoplights I could find out were some Dutch-European and the original maxis one. I wanted some So-Cal curvy stoplights, which were nowhere to be found, so I decided to BAT one for myself. I found out how to replace the old one, which was as simple as changing an instance number using the iLives reader program. Later I decided to share it, including some simple props like a stop sign.
    Another example is the PWG lots I made some time ago. Those lots were very personal for doing a city fast, but I thought it could be useful to others by sharing it. Eventually I decided to remove it (including many of my creations, such office buildings and gas stations), due a compatibility bug reported. As of today, I haven’t taken the time to re-export and upload again.


    ST: I think most custom content creators would consider their work a hobby, but like anything in life, some parts are more fun than others. What do you consider your least favorite part of the BATing process? What about your favorite?
    Heblem: My least favorite part of BATing it’s of course waiting for exporting and the darn export code error 6, hah! lost many hours and projects due the exporting procedure, mainly because of my old computer specs were insufficient, especially in memory. Initially I used a 2005 toshiba laptop, and many projects took over 20-30 hours to export. Many times the computer would overheat, turn offs, or the process failed due to an export error. I’ve lost many projects, such as the Bellagio casino, nighlight of Treasure Island, Old design of Burj Dubai Tower, office skyscrapers and many BATs due that reason. I now own a better and more powerful machine which I hope to use to complete projects and never again see the export code error, but unfortunately as I get older, other priorities are first.
    As a hobby, my favorite part of creating BAT’s it’s the ability to project something you see, and you like in RL to the game. To give it its correct textures/materials, lighting and modeling, properly match as it is in RL and share and see what others think about your creation is exciting.


    ST: Since this is a sort of hobby (in the sense that custom content creators are not paid for their work), what keeps you motivated to continue releasing new creations for the SC4 community to enjoy? How much do comments in the download section mean to you? Do you get a thrill seeing your models pop up in CJs?
    Heblem: Of course it motivates me seeing peoples comments, and watching my creations get used in their CJs. It means a lot to me. Almost every two or three months I do an extensive search at Simtropolis or other sites about how people uses my creations. I do a search of HBS, Heblem or simply looking at CJs, for example, Basted69008 - he has an amazing CJ diary called San Theodoros which mostly uses my old creations from LBT and some exclusive BATs and props I sent to him.


    ST: You have been BATing wonderful models for over 6 years now. Is there any one of your creations that you are particularly proud of? Are there any fun stories or facts relating to some of your works that we don’t know about?
    Heblem: Well, I have been active in the community since 2006, and since then, I have created hundreds of models, mods, maps, textures for over 9 years, including my old account of Hableurg (2006-2009) and currently Heblem in Simtropolis. In those years I have made a few CJ’s such as (small mini cities of the world), Canatlán (a Mexican city using LBT props) and much better and personalized city and of course my https://www.youtube.com/watch?v=azYEvtKjbvw, a totally eyecandy American town. I’m proud of making many of these creations, including top quality BATs and lots like the recently uploaded commercial stores, restaurants and such.
    Over these years, there has been many funny moments and collaboration with different people who share their knowledge. For example, making detailed 3D maps, general modeling help,
    rendering, seamless textures and many aspects to be better and create better custom content.


    ST: Has your experience BATing had any influence on your personal or professional life? Are there any skills that you have developed over your BATing career that have helped you beyond the world of SC4?
    Heblem: It has definitely influenced me over my professional life. Many BATers around might be going for architecture or civil engineer careers for their professional life. In my case, video game development influenced me, and I just graduated in August 2014 with a degree in Game Design thanks to family and friends. The BATing career gave me the opportunity to be a better 3D designer, and it made it possible to learn many new things that I can apply to SC4, other games or even new games.


    ST: What advice would you give to a new member of this community who was planning on creating their firstBAT or mod?
    Heblem: My best advice to them, just never give it up. Give yourself a second chance, or maybe a third, the third always scores. Ten years ago I was in the same boat as you. I just gave myself a second chance and finally made it. Once you know how to do it, you’ll want to learn and do more.


    ST: Simtropolis is organized into ‘player’ and ‘builder’ categories. Regarding the ‘player’ section, do you have any favorite CJers that you enjoy following? What are your favorite SC4 ‘scenes’ (i.e., towering metropolises, urban sprawl, rural landscapes, etc.).
    Heblem: Honestly I only look at few CJs once a month because lack of time. I do especially look for those who use my custom content, such as, Bastet69008’s San Theodoros, whom I mentioned before. And for those who are asking for me to take a look into their CJ, I will gladly look at and comment. But as for myself, I don’t really use the forums often or comment much (if you see my profile I have less than 400 post in 6 years). Mostly I just visit Simtropolis to look at new comments in my mailbox, do searches, post something in my BAT thread and upload something (rarely). There was a time in which I used to be more active here at Simtropolis, back in 2006-2009, using the Hableurg profile.
    My favorite SC4 scenes are landscaping, using MPPs, mountains, river streams, trees, etc. Basically because it reminds me of nature (I love nature). But I also enjoy looking at urban sprawl, but not really a fan of towering metropolises.


    ST: On the ‘builders’ side, do you have any favorite BATers that you enjoy following? If you still play SC4, what was your most recent download from the STEX?
    Heblem: Recently, the lots by nos.17 have attracted my attention because of the quality he puts into so many detailed lots. I even sent him an old commercial file stored in my computer for him to lot and upload, and honestly he did a great job! That’s my most recent STEX download.
    Lately I haven’t played SimCity 4 due lack of time. Last time I opened the game was for doing some lot testing at Mall del Sur (my latest creation), but overall in last 6 years, I haven’t played as much as I should. Most of my SC4 spent time is spent on custom creations such mods and bats. Additionally, I have been attracted to other games instead.


    ST: SimCity 4 has been out for over 12 years now. Are you surprised that this community is still going strong all these years later? What do you think is the secret to its longevity? Do you think there will still be new content being created 12 years from now?
    Heblem: Yes, I’m surprised it keeps going on after 12 years. It’s longevity is mainly due to its strong community in the creation of daily new custom content, and currently it’s the only game capable of making a huge “realistic” city than any other city building game.
    I think there will be new content even after 12 years, but it depends on those who still play, and if those kids who play today will learn to BAT and contribute more into the game. Even if a new better “Sim City” like game comes out in a future and convinces us to change over to it, I don’t think it is going to kill SC4 after more than 12 years of custom content. It will be a hard to kill for years to come.


    ST: Other than SC4, what types of games are you involved in?
    Heblem: Before I got involved into the SC4 modding and bating community, I used to make campaign scenarios for Age of Empires II (from 2000 to 2006). I made famous TD games, like Warriors Defense, Empire Defense, fixed and improved many active maps, like AN’s world map, castle bloods, and cooperative. Strategy games have influenced me into pursuing video game development as a career.
    Some other games I play include Far Cry 4, Banished, Minecraft, The Crew, AC Unity, Sanctum 2 and many other games from Steam.
    And recently I’m collaborating in doing Huntington City in Minecraft, (not all work is mine) Take a look to Huntington Surface map, I think you’ll love it. It’s like SimCity but in Minecraft!
    Also I do projects with Cry Engine and Unity 3D, I have city creation projects in 3D within Unity 3D.


    ST: What are some of your favorite hobbies or activities away from a computer screen?
    Heblem: As a hobby, currently I like doing 360° panoramas of the environment and nature of some public spaces.


    ST: Will we see any new SC4 content from you in the future?
    Heblem: If I get enough time, I hope to create some more content for SC4, but eventually I plan to stop doing so.
  22. nos.17 liked an article by NMUSpidey, 100 Million STEX DL: An Interview with MandelSoft   
    ST: When did you first get SC4, and what do you remember about your first experiences with the game? Was SC4 your first involvement with SimCity, or did you already have a history with the sim games?
    MandelSoft: SimCity was not my first introduction to the simulator genre. I once got two sim games for my birthday: Rollercoaster Tycoon 1 and Transport Tycoon Deluxe (yes, the original DOS game). Back then, RCT was already hard to install 135MB on a 4GB hard disk on a Windows 95 PC (boy, those were the times). I had many hours of fun with Transport Tycoon (including the chiptune music in all its glory) and I still play OpenTTD today. More people on this website are familiar with OpenTTD, but I don’t think many have played the original game.

    My first introduction to the SimCity series was SimCity 2000. Since I never really got track of that game (I was really young then, probably 6 or 7 years old), I ditched it aside pretty quickly. SimCity 3000 felt a lot better and I enjoyed that game, though I made some quite beginner mistakes.

    Then SimCity 4 came along in 2003. I had the vanilla game, but I didn’t got the hang out of it at the first try and I ditched it aside. Yes, a fan like me ditched aside SimCity 4 once for quite a while. But I was just 11 years old back then, and I was probably not old enough to really “get” the game…

    Then 2006 came along. I picked up the game again and I finally got how the game works. And I have loved the game ever since! In 2007 I bought Rush Hour (second hand, best purchase ever!) and in October 2007, I discovered Simtropolis. Since then, SimCity 4 has never been the same for me...
    ST: What aspect of SC4 do you enjoy most – what keeps you coming back?
     
    MandelSoft: SimCity 4 offers you a toolkit not just to make any city, it offers you the tools to make YOUR city. There are so many ways you can construct a city, how to design the layout, what services you offer, what style of infrastructure and architecture you're going to use and more. With the amount of custom content we have today, the possibilities are endless! I can see that most familiar SimCity 4 players have a distinct style.

    ST: Do you recall the first plugin you installed?
    MandelSoft: I think it was either the Streetlight Colour Mod or the Network Addon Mod, I can’t recall…
    ST: What led you to Simtropolis at first? Can you remember your initial impressions of the site?
    MandelSoft: The custom content, of course! I was searching for more possibilities, and especially to make my cities look more Dutch. At first, I only was here to download, but after a while I started browsing the forums. I never could have imagined that I would ever become such an integral part of the community. Everybody has to start somewhere.

    ST: Describe your progression into the world of SC4 custom content. Was it a particular lot or BAT that inspired you to take the first step?
    MandelSoft: Pffft, I don’t know anymore. I think it was the possibility alone that adding custom models to the game was enough inspiration for me to do my own work. I had some troubles getting gMax to start BATting, though.

    ST: Speaking of first steps, what was the very first thing that you modeled using the BAT? Do you still have a screen shot?
    MandelSoft: My first BAT was my own house. But it looked horrible, and for a few years I tried to clear them from my cities. My first serious BAT was a Dutch signage pack (and this was released, and deleted again). This one was overscaled quite a lot and poorly modelled. I don’t have pictures of it anymore, but it took me another three versions to get the proportions right.

    ST: Your list of uploads is populated by a large number of road mods. Are there any particular reasons for choosing to direct your efforts in this direction, beyond just general roadgeekery?
    MandelSoft: Most of these things are easy to model. Most signs only use basic geometry, especially boxes and cylinders. By combining them in a clever way, you can still get a large variety of shapes. One thing you do have to take care of is texturing, which is important with signage. Streetlights are a bit harder to model, but these things are small props, so one model is not really that complex.

    However, I didn’t do just easy stuff. Road texture sets are a lot of work. Not because it’s hard, but because there are so many textures to modify. It took me three and a half months to prepare the RHW Euro Texture Set for the RHW 3.0 ready. The Ontario Texture set took me a month (because I had the basic set ready in vector format).

    ST: What do you find fascinating about roads and their signage, lighting, etc?

     
    MandelSoft: It’s hard to explain. I just have that odd twitch in my head

    ST: What is the thought process behind choosing what to create next?

     
    MandelSoft: There is not much thinking about it. I just choose whatever I like to do next, whatever I can motivate myself for. In some cases, it’s about what I feel missing in the game and what I am able to make.

    ST: I think most custom content creators would consider their work a hobby, but like anything in life, some parts are more fun than others. What do you consider your least favorite part of the BATing process? Your favorite?

     
    MandelSoft: Some would say rendering is the least favourite part of the BATting process, but my least favourite part of the process is the finishing of the lots. This means getting the lot descriptions right and adding icons to the lots. Keep in mind that I usually make signage packs of dozens of signs, which means a lot of icons. This becomes a huge pain to make everything look right.

    My favourite part is the modelling itself. Just like in SimCity 4, I like to create stuff, to see things come from the mind into reality, regardless if this reality is virtual or not.

    ST: Since this is a sort of hobby (in the sense that custom content creators are not paid for their work), what keeps you motivated to continue releasing new creations for the SC4 community to enjoy? How much do comments in the download section mean to you? Is it exciting to see your models used in the CJs of others?
    MandelSoft: I really like to see my stuff coming back in other people’s CJs. Then you see that other people really appreciate your work, and that gives me satisfaction. This is also what motivates me to make new stuff, other than the fact that there are some things I really like to see myself in-game.

    I usually don’t read many comments, but I do want to take action if somebody comments on a bug.

    ST: You released your first file in 2008. Is there any one of your creations that you are particularly proud of? Are there any fun stories or facts relating to some of your works that we don’t know about?
    MandelSoft: The thing of quite a few of my creations is that no one really took the effort to do something similar. The Light Replacement Mod (not just replace the light cones, but the lamp posts themselves too) , the Stoplight Replacement Mod, the ploppable streetlights, the Highway Re-Styling Mod. No one has ever really tried and released such a feat. Also, there were a few signage sets in the past, but I really expanded the choice with a lot of European signage styles. I’m also very fond of my NAM creations, but that’s pure teamwork and I never got that far without help of my wonderful team mates.

    I’m also particularly proud of the Pactagon building. It is a funny looking building, but not too unrealistic. It is a quite original building design to fit on a roundabout center. A worthy headquarters for the NAM Team!

    One fact people may not have known before is that one of my mods was inspired by a mod that turned out to be a hoax. There was a project called the M25 Project. Basically this was a quite beautiful looking reskin of the Maxis Highway. At one point, development just stopped. I decided to start over again and make my own set, the Highway Re-Styling Mod. Later, it turned out that my inspiration was a Photoshop hoax. The member who pulled that off has made such a bad name that it may never be mentioned ever again. The same member also worked on a streetlight mod which inspired my Light Replacement Mod. So two hoaxes were eventually realised “properly” by me.

    Some other fun facts about some of my other downloads:
    Everything in the Frickinhuge Signage Set is either a pun or a reference.
    My latest release, the Carthamia Imperial Tower, was made for a friend.
    There is a brony advert on the Pactagon Building, as well as a PacMan advert.
     
    ST: Has your experience BATing had any influence on your personal or professional life? Are there any skills that you have developed over your BATing career that have helped you beyond the world of SC4?
    MandelSoft: SimCity 4 had one big influence on my life: I became a Civil Engineer because of SimCity 4. I completed a Bachelor degree in Civil Engineering in 2013 and I’m getting my Master’s degree in the specialisation Transport & Planning this year. Thus far I’m the only NAM member with a degree in the field

    ST: What advice would you give to a new member of this community who was planning on creating their first BAT?
    MandelSoft: I would give three important points to remember:
    Start small. Before you can make full-scale buildings, it’s best to start with small stuff like props. This will let you get to know the tools better. If your first project doesn’t succeed, you are more likely to quit. Larger projects often have a larger chance of failure than smaller ones. Therefore, start small.
    Never cease experimenting. Change some settings and see what it does, try something new, or just do things without knowing what you are really doing. Experimenting is an important way through which I learned all the skills I have. By experimenting, you get to understand the tools better.
    Failure is an option. Yes, you will fail quite a lot along the way when experimenting, but that’s all right; failure is an option. Each failure brings you one step closer to success, since you know what works and what doesn’t work. You have truly failed if you didn’t learn from your failures. So try a lot, fail a lot, but eventually learn a lot.
     
    ST: Simtropolis is organized into ‘player’ and ‘builder’ categories. Regarding the ‘player’ section, do you have any favorite CJers that you enjoy following? What are your favorite SC4 ‘scenes’ (i.e., towering metropolises, urban sprawl, rural landscapes, etc.).
    MandelSoft: My favourite SimCity landscapes are old cities and night scenes. I have a weak spot for both. In SimCity 4, it’s quite hard to make a city look centuries old. People who pull off that trick earn my deepest respect. These old cities have a very strong own unique character, I like that. I also like night shots, since this shows how the city is alive at night with all the pretty light effects.

    I don’t really follow CJs; I usually look around at the “show us your …” sections. I have some people that have inspiring creations. McDuell is completely mad when it comes to building interchanges; he builds one mind-blowing interchange after the other. Haljackey’s “Building a City from Scratch” is a huge undertaking that helped with popularising SimCity 4 again. Both of them should get a lot of respect, but let’s not forget all the other CJers out there that make great and unique content!

    ST: On the ‘builders’ side, do you have any favorite BATers that you enjoy following? If you still play SC4, what was your most recent download from the STEX?
    MandelSoft: I still have huge respects for the NYBT. The team still produces some high quality BATs for everyone to admire. I also respect Reddonquixotte’s work a lot. Each release of his is a masterpiece!

    ST: SimCity 4 has been out for over 12 years now. Are you surprised that this community is still going strong all these years later? What do you think is the secret to its longevity? Do you think there will still be new content being created 12 years from now?
    MandelSoft: I think the secret of the longevity of its community is its general attitude. From what I’ve seen, the SimCity community is highly tolerant, intelligent and respectful. Everyone respects each other, mods are rarely stolen, people have intelligent discussions, not a lot of people ask obvious questions answered hundreds of times and aside from members who have really misbehaved, no one is really hated here and there is always someone there to help you if you have a problem. This is what keeps our community strong. The custom content for this game stretched out the life span of the game too, and the creators are backed up by such a great community!
     
    I still would like to come back to SimCity 4 one day…

    ST: Are there any games you play besides SC4? What other hobbies do you have away from BATing and SimCity?
    MandelSoft: I haven’t played SimCity 4 lately, due to my work at ProMods for Euro Truck Simulator 2. I’m still building cities and roads, I’m still modelling streetlights and signs, but just for another game. The good thing is that this game offers you a completely different perspective, namely of a driver. This is a quite relaxing game, and I’d recommend to play this game with the ProMods map mod.

    I’m also a music producer in the trance genre. I have quite a passion for music making. My work can be found on YouTube and Soundcloud under the name MandelSoft. I have quite some tracks I’m proud of. I can most definitely recommend “Aurora Borealis”, “Moonrise”, “Day of Pi” , “Waves” and “Drifting in Dreams”.

    I’m also working on Geofiction projects. Geofiction is the art of creating and maintaining fictional countries. I’m part of a Dutch geofiction-community who share a geofiction-world together. I can use my InkScape skills for various aspects, like drawing maps, flags, infographics, etc. It’s an unusual but interesting hobby. I have met these people in real life and we are a fun group.

    ST: What question have I not asked that I should have?
    MandelSoft: Maybe what “player” project I participated with I’m the most proud of? That would be the NORO Co-operative. This is a huge multi-player region on SC4Devotion.com with the crème de la crème of the SimCity 4 building community. It’s a high-quality region with a lot of challenges. I’d recommend everyone to take a look over there. You’ll find some great inspiration how to make your cities look a lot better!

    Best regards from your head-banging NAM-Pony,
    Maarten (MandelSoft)
     
    Interview questions by SimCoug and NMUSpidey (but mostly SimCoug), MandelSoft interview conducted by NMUSpidey
  23. nos.17 liked an article by Ace3, Using Photoediting to Enhance Ingame Pictures   
    For those of us who enjoy showing what we have accomplished in CJs or in the Forums, I thought it may be a good idea to form a tutorial. I am no professional at photoediting, but after much experience, I have gained a decent amount of knowledge that I thought would be a good idea to share incase you are new to the concept. You don't have to be an expert either to understand this tutorial. If you find that this is hard to follow, PM me and I'll do my best to help you out. Just remember though that photoediting is sort of the icing on the cake and really isn't essential to provide amazing pictures. Remember to enjoy the game, and if photoediting feels like to much of a burden, its not a necessity.

    Before:



    After:



    Getting to Know the Basics:

    Dependencies:

    What you get out of this tutorial is what you put into it.

    -Knowledge of how to navigate through your photoediting program (I'm using Photoshop CS5 64-bit for this tutorial)
    -Creativity and Patience, Don't overdo the effects and make your picture unique through them.
    -Yellow Pause Thingy Remover

    Ok, so now that we have that down, let's start with the basics. Pictures taken ingame appear in "C:\Users\-----\Documents\SimCity 4\Albums" for Windows users (Not sure about Mac, sorry). To take a picture, minimize the menu completely and click Ctrl+Shift+S. Simcity 4 provides several frame sizes for you to take pictures with. I reccomend you use either the full screen frame or the frame size right before it (5 Spacebar Taps from the full screen frame). Why? These two frames automatically size images at 1024x768 (Full Screen) and 800x600 (Frame Size Before). Since the maximum size of pictures you can post onto Simtropolis (and many other forums and sites for that matter) is 800x600 pixels, you are set to go. This is helpful to the reader who doesn't want to strain their eyes looking at smaller pictures. You can resize smaller resolutions to a higher resolution, but this may distort the image or cause blur.

    Resizing Images:

    The first thing we want to do is to understand how to resize an image before we upload it to an image hosting site (e.g Imageshack). This prevents the grey "Resized to _%, was (-x-) Click to Enlarge" border from appearing around our pictures that are not 800x600.

    1. Open the image that is larger than 800x600.

    2. Click Image-Image Size...





    3. Change the Width to 800. If you have the "Constrain Proportions" box checked, you will see the height automatically adjust proportionally. Otherwise type 600 in the height box.



    4. Click OK and then File-Save (Or Save As if you wish to keep the original size and make the resize a new image)

    And that's it! Not bad right?

    General Photoshop Knowledge:

    1. You should know that if you place an image, place a shape, create a new layer, etc. while editing an image, you will need to flatten it out (right click background layer
    2. Don't overdo image editing. Oversaturating or making an image to bright can hurt the eye instead of please it.
    3. You should upload only images in jpeg format. Png formatted images can increase page loading times. Since the game naturally saves ingame taken pictures in png format, please use File-Save As-File Type-JPEG for ALL images you upload.

    Touching up on Images:

    So now that we know how to make all our images the same size (unless you crop your images which can change the dimensions), let's look at other things we can do to make our image more generally appealing. We'll start with the basic ones.



    -Brightness: Changes the levels of white emitted in your picture. Play around a bit with it and find an appealing amount.
    -Contrast: Changes the levels of black emitted in your picture. I personally enjoy increasing the contrast a bit in almost all of my pictures.
    -Levels: Not sure how to state this one. Crossing the white and black slider can turn the image negative. Mostly only handy when photoshpping mist in rainy pictures.
    -Curves: Adjust Brightness, Contrast, and Levels all at the same time.
    -Exposure:Adjust the amount of light your picture was taken in. I don't mess to much with the exposure slider, but sometimes I move the gamma correcton slider a bit in my day pics.

    Before (No Gamma Correction-Raw Image from Game)



    After (Gamma Correction)



    -Vibrance and Saturation: Adjust the levels of all color emitted. I wouldn't mess too much with these, but a little bit more (or less) vibrance always looks great.
    -Hue: Changes the definition of your colors. Red pixels can turn purple and green ones can turn yellow by a simple adjustment of this slider. I don't reccomend you do it at all though if your going for a realistic feel.
    -Color Balance: My favorite ones to adjust. You can make day pictures look like morning or sunset ones. You can also change the atmosphere the picture creates.

    Before: (Raw Image from Game)




    Adding some Yellow: (For that sunny afternoon effect)



    Mixing the Red and Magenta: (For that early morning -dawn- effect)



    Mixing the Red and yellow: (For those sunset shots)




    -Black and White: Turns all colors into black and white hues.
    -Photo Filter: Changes the Amount of a specific color emitted
    -Channel Mixer: Adjust hues individually
    -Invert: Inverts colors into their negative form
    -Posterize: Gives a poster resembling feel to pictures (somewhat of a propaganda creator in my opinion)
    -Threshold: Adjust the detail provided in black and white pictures
    -Gradient Map: Applies a semi-transparent gradient to your pics.
    -Selective Color: Adjust the color-balance of a specific set of color tones
    -Shadows and Highlights: Adjust several aspects of your picture at once here.
    -HDR Toning: Adjust several aspects of your picture at once here. You can accomplish great pictures using some of the preset options alone.
    -Variations: Get selectable previews of color balance adjustments until you are satisfied.


    There are many more options available. I reccomend experimenting with the Dodge, Burn, Sharpen, Blur, and Sponge tools available on the left hand column. You can also perform many adjustments by using a paint brush on a low opacity (transparency-solidness) setting. The more you experiment with these tools, the more efficiently you'll be able to use them.

    Let's go through a step by step process so you can get an idea of how to use photoediting programs. This will be the beginner tutorial where we go over the basics and add some special touches here and there.


    Beginner Tutorial:

    So we have this picture of a train passing by some farm fields in a fall setting. The picture itself isn't all that great (not much that's interesting), but with some photoediting we can make it alot better.



    First Thing I want to do is to raise the contrast. We want to bring out those fall colors.



    Changing the Gamma and Exposure a bit, I recieve the desired effect, but the train loses some of its textures, no problem of course.



    I change to the Burn Tool at an exposure of 87% and a brush size of 37.



    I then touch up on the train to make it a bit more textured and darker. After 2 coats, the train looks much better.



    Now what's better than a sunset train ride?



    We can use the blur tool at a very small exposure setting to reduce some of the grain and give it a softer look.



    I think that's enough. Time for the before and after shots!

    Before:



    After:



    The editing itself only took me about 5 minutes, but I've become better at photoshop over the months. This may take 30 minutes or more depending on how good you can follow. If it takes a while don't worry, you can always take a break and come back later (or quit) if you don't feel your enjoying this. That being said, let's move on to the Intermediate Tutorial!


    Intermediate Tutorial (1):

    Here we'll go a explore Photoshop's tools a bit more and even add some special effects to our pictures. The only part that is harder is that we will have to set a goal so that we can touch up on the picture according to our goal.

    In the Intermediate Tutorial, you'll learn how to add rain effects (from drizzles to heavy rain), fog, lens flare, motion blurs, and designs to your pictures. This will provide you a sturdy base to start editing pictures with.

    Let's Begin! Here we have another raw image.



    We'll open it up in photoshop. I want to add a light rain and make it a bit more dull with some of fog. This way we can make the picture seem a bit more interesting, let's begin with giving it a more dull feel.



    Now we can edit the color balance to kill any remaining bits of out of place color.



    So far so good. Here I will introduce the filter section. The filter section provides several filters that you can use to enhance your images such as posterization, watercolor filter, glowing edges, and several other effects. For this image, we only need Filter-Distort-Diffuse Glow...



    Take note of that I don't want any grain to be added and am using a very light glow for the fog.



    Alright, so now we need some rain. I made my own rain overlay which can be found here:

    Rain Overlay

    Save the image (a temporary spot such as your Desktop will do):



    Go back to Photoshop. File-Place...Then navigate to where you saved the picture and place it into Photoshop.



    You should recieve something that looks like this:



    We'll use the Screen Filter to get rid of the black while leaving the drizzle unharmed. Right Click on the image and select place to get rid of the crossing diagonal lines.





    Select the (paint) brush tool and "attempt" to paint over the layer. You will be asked to rasterize it. Click OK.



    Now we are free to edit the layer (placed image, in this case the rain) as we wish without changing the look of the background layer (foggy beach picture). I'll raise the brightness to make the drops more visible.



    Although the water doesn't look to bad, I want to add another effect to it. Let's find a nice overlay from Google. Using the same steps as the rain, we can place the overlay into photoshop. I'll cover all of the existing water up with the new overlay:



    Then I'll select the Lighter Color filter.



    Set it at a 30% Opacity,



    Select the (paint) brush tool, make sure you still have the water layer selected. Rasterize it by clicking the image with the brush tool.



    We can then select the Clear setting at an Opacity of 100.



    I then clear all areas of the overlaying water that overlap with the shore, rocks, waves, cattails, etc. Notice that I've duplicated the layers on the bottom right. You can do this by right clicking on a layer and selecting "Duplicate Layer" You can then move the duplicated layer around by holding Ctrl and moving your cursor. I used this because on the left of the overlaying waves was a slight blue tint I wanted to get rid of. I realized that was the hard way. You can just make the layer black and white by going to Image



    The image is then flattened and finished.



    But of course I have to add in two more cents.



    Hehe...



    Before and After anyone?-I realize now the effects were a little overdone.





    And that concludes the first section of the Intermediate Tutorial.

    Intermediate Tutorial (2&2.5)

    Here we will examine the motion blur and lens flare filters.

    First we'll start off with this picture of a car by the water. I want to make the setting more sunny and more tropical.



    Thus, I will adjust the brightness and contrast first.



    Then we can make the picture a bit more yellow, this is always a good photoedit tip for pictures taken in bright sunlight.



    And then a little bit more colorful:




    Time for the Flare! Although I don't like using the Lens Flare filter alot, it can help when trying to naturally brighten up an otherwise rather low lit picture.



    Under the following settings:



    And then I'll adjust the Shadows and Highlight settings to make the trees brighter.



    That is all! I think further editing would be overdoing it...

    Before:



    After:



    And that concludes this part. Now we'll look at motion blurs. So we have this nice picture of a high-speed train passing by a snowy setting. The only thing is, the train doesn't look so high-speeed...



    First we'll touch up the image:



    Make it a bit more cyan to give it somewhat of an icy effect:



    And now we'll duplicate the layer in order to start working with the motion blur:



    Filter-Blur-Motion Blur...



    And now we'll make sure it is in the direction of the moving train by setting it at an angle of 63.



    And then we'll select the brush tool with a size of 25 at 100% Opacity and change the mode to "Clear".



    Running this over the entirety of the train, we erase the section of the motion blur layer and recover the original background layer for the train alone. The surroundings still remain blurred.



    Before:



    After:



    I may have brightened it up a bit too much but anyways...Now we'll flatten, save as, and finish. This concludes Intermediate (2).

    Intermediate Tutorial (3):

    In this part of the intermediate tutorial the only thing we'll really cover is how to use the (paint) brush tool effectively.

    So we start with this standard picture in the suburbs. Since the trees are in their seasonal winter setting, I want to add effects that would make the picture seem as if it were a snowy Christmas Eve.



    We'll start by making the picture a bit darker (since winter nights aren't very bright) and raising the contrast so the original lighting still shows through the darkness.



    Now we can reduce the exposure and gamma correction to make it reflect the winter season a bit better.



    I then lower the saturation and vibrance to make the christmas lights on each house (that I'm about to add) stand out more.



    I choose a very small brush size (2 pix) at an Opacity of 35%.



    Using different colors with the same brush settings, I add some lights to this house.



    And then the next one as well, the process is already beginnning to get a bit tedious.



    I took a break by only adding white lights to this house. Not everyone puts up colored lights...



    Added some to the other side of the street. One house only has lights on the bushes.



    More were added to the houses on the top left.



    And then to the ones on the right of the intersection.



    Many lights were added to the houses at the bottom to finish the lighting.



    Now for some snow! I like this texture...



    We'll place it with the settings "Lighter Color" and at an Opacity of 78%



    The snow had some colorful edges. After rasterizing, I decided to put a black and white filter on it.



    And then adjust the brightness so that it fits in better with the surroundings.



    Next, I add finish it off with a nice little subtitle before flattening and saving.



    Before:



    After:



    And with that, we conclude this section of the tutorial.

    Advanced Tutorial:

    In this tutorial, we will cover;

    -Mosaics
    -Special Effects

    Let's start with Mosaics! First we need to understand some basics:

    Full size Mosaics are composed of 800 by = 600 pictures. Mosaics are pictures that are vertically aligned over the same area. We can align these pictures by taking them with a common area that we can use to overlap the pictures.

    So Here we have one picture:



    And Another:



    We open the first one up in Photoshop:



    Go to Image-Canvas Size...



    And then make the height at least 5x Bigger:



    So it then looks like this:



    We then "Place" (File



    Set the layer to a temporary "Hard Light" Filter and Align the Pictures. Zoom in to make sure they are aligned perfectly.



    Switch the layer back to Normal After this. Rasterize it.



    Then Crop the Picture like so:



    Now we do all the editing...I'll tell you the last few steps to making the mosaic after the editing.
    So I go to google images and find a couple of explosions that I like...



    And then place them using the method shown before. I used the clear mode on the brush tool to blend it in. After Flattening, I then added some green and yellow tints and reduced the saturation to make it more depressing.



    I have made a New Layer and then Clicked Filter-Render-Clouds. The Opacity of this layer is 31% on Vivid Light.



    I added Fireball Effects...The result is not as great as I would've liked but it's not terrible...



    Using a texture off of google, I made the rotors spin. The layer was set to multiply and free transformed (Edit-Free Transform) to make it fit with the angle.



    Using another picture off of google, I made some rockets.



    I think that's good enough. This tutorial was supposed to help you to learn about mosaics, so let's get back to that...



    Go to Image



    The information here is important, it tells me I only need to use two vertically aligned pictures since the height is less than 600 times 2. Instead, I need one 800x600 picture and one 800x404 picture. I can crop out these portions of the picture and then upload them separately (one on top of the other) to form the mosaic. So we select the crop tool and set the width and height to 800x600.



    Crop the area.



    And save the 800x600 area we just cropped to a temporary folder.



    Clicking Ctrl+Alt+Z once or twice should take us back to the full mosaic. Set the Crop dimensions to 800x404 this time and crop out the bottom part.



    Save this as something else. Now we can upload it to ST by using the following format:No spaces in between.




    Please note that if your mosaic pixel height is greater than 1200 (involves more than two 800x600 pictures) than use this method:

    1.Crop out top 800x600 pixels: Save As: Click Ctrl+Alt+Z until you get back to the full mosaic
    2.Crop out top 800x1200 pixels: Crop out Bottom 800x600 Pixels: Save As: Click Ctrl+Alt+Z until you get back to the full mosaic
    (if needed)3. Crop out top 800x1800 pixels: Crop out Bottom 800x600 Pixels: Save As: Click Ctrl+Alt+Z until you get back to the full mosaic
    (if needed) 4. Crop out top 800x2400 pixels: Crop out Bottom 800x600 Pixels: Save As: Click Ctrl+Alt+Z until you get back to the full mosaic
    5. Keep going until the last section of the mosaic is 800 by(less than or equal to) 600 pixels. Then use the method above...

    So Before:




    After:




    That's it! Your good to go. Now for Part 2, the special effects section!

    Here we have a dogfight. (Yes this image is raw as well) Let's spice up the action!



    First adjust the brightness and contrast...



    And then the Color Balance...



    I'll make it less vibrant so it gains a more formal look...



    And then I created a New Layer, Filter



    Duplicated the background layer and added a motion blur to the duplicate. I used the brush tool on clear mode to recover the previously blurred planes.



    And then I'm done!



    Before:



    After:



    And with that we conclude the tutorial. If you stuck with me until the very end I thank you. Please remember that photoediting should not be abused. Do not photoedit pictures and claim you have created something that really doesn't exist. Use it only to help get the point across that you want people to recieve when looking at your pictures. I've actually never used GIMP before, though I hear its a great tool. I am not familiar with the interface, but I think the concepts in this tutorial will still apply. Thanks and I hope this was helpful.

    P.S If there is any formatting error or something that comes up, please don't hesitate to let me know. I had some trouble with the formatting of the tutorial (like less than and greater than symbols and some other stuff).
  24. nos.17 liked an article by phillippbo, BAT Essentials Part 1   
    Links to other parts of this tutorial: part2, part 3, part 4
    Introduction
    Everybody was asking for it, so here it is. This is going to be an all-inclusive tutorial on the BAT that will take you from starting the model to getting the lot into SC4. I hope to establish all of the absolute basics you will need to create the building of your dreams, texture it, light it, export it, define the properties in the Plugin Manager, place it on a lot, and seeing it in game.
     
    There will be a few of the more advanced features covered, but by and large this will be a basic tutorial for beginners. Below you will find the index of all pages (I divided each section into a different page to save page-load time for all those on dial-up, and to save my sanity when trying to organize this tutorial). This tutorial will cover a Commercial Building, but the lessons learned here could easily carry over to a Residential, Landmark, or even an Industrial Building. I chose Commercial as they are usually boxes, and it would be easier for me to explain to you (and for you to model) a rather simple building. Without further ado, I now present the tutorial.
    Getting Started
    (At this point, I am assuming you already have gmax, the BAT, the Plugin Manager, the new Lot Editor, and the SC4 patch installed on your system. If you don't yet, go get them now.)
    Well, to begin any good tutorial, we'll have to begin at the beginning. In this case, we need to familiarize ourselves with the BAT/gmax. Firstly, open the BAT by double-clicking the "SC4 BAT" icon on your desktop.
    NOTE: I refer to the "BAT" and "gmax" as interchangeable terms. In reality, gmax is the modeling program, the BAT is simply the pre-made Maxis lighting rigs and export tools (among a few other things). Just remember that if I say "the BAT" or "gmax," I'm referring to the same program.
    Once you get the BAT to open, take a minute to look at the interface. It's broken down below:

    Command Panel - you'll be doing most of your creating from here. This is also where the "rollouts" everybody talks about are. I refer to this panel often, but I'll put screenshots to show what I'm talking about. Main Toolbar - extremely useful shortcuts to the menu bar commands. Bottom Bar - the two most useful things here are the X, Y, and Z boxes, as well as the "Snap" button (discussed later). Menu Bar - just about everything within the BAT can be accomplished from here, but many are duplicated in other tool bars. Bottom Bar #2 - all your zoom, rotation, and pan commands are here. Viewports (not numbered) - four different views are shown here. The default is top, front, left, and perspective, but you can customize them to show anything you want them to. If I ever say "start out in the left view", then I mean to use the Left Viewport when creating whatever I'm having you create. Helpful Tips Regarding the Zoom, Pan, etc Controls:

    Zoom - with this button clicked on, you can left-click in a viewport and, by moving the cursor up and down, zoom in and out. Zoom All - similar to the "Zoom" button, but it zooms all active views at the same time Zoom Extents/Zoom Extents Selected - zooms the view out a fair distance (haven't been able to figure out the difference between the two selections yet--but I'm sure there is one). Zoom Extents All/Zoom Extents All Selected - "Extents All" moves all active viewports out, "Extents All Selected" (when pressed) zooms in on whatever object(s) are selected. Region Zoom - my favorite, allows you to drag a box into one of the viewports--when you let go of the mouse button, the view zooms into and re-centers on the box you created--the box is not an object. Pan - with this button clicked on, you can left-click in a viewport and move the view around. Arc Rotate - very fun to play with; with this button clicked on, you can left-click in the viewport and drag the view around to any angle your heart desires. Min/Max Toggle - very simply, it makes the active viewport large enough to fill the area that all four viewports are currently occupying. NOTE: Any button with a little arrow in the lower right-hand corner (look really closely at the picture above at buttons 3, 4,and 7) means that button has more than one option. If you click and hold the button, gmax will pop a little box above the button giving you all possible choices. Take note that all of the button choices are available, even the currently selected one.
    Now you're going to want to make sure the units are set up correctly. The BAT does ship with these set up automatically, but it never hurts to make sure. After all, you wouldn't want to spend two days modeling your dream building and then realize the scale is way off, would you? Take note that with these settings, the grid lines that are shown will give you the SC4 scale. In other words, the lighter-colored "blocks" will be 1 meter on each side, and the darker-colored ones will be 16 meters on each side - or one tile in SC4.

    Customize>Units Setup

    Ensure "Generic Units" is selected.

    Customize>Grid and Snap Settings

    Home Grid>Grid Spacing 1.0 and Major Lines 16.

    Customize>Preferences

    System Unit Scale: 1 Unit= 1.0 meters

    Helpful Tip Regarding the Viewports
    If you right-click on the viewport name in the upper left-hand corner, it will give you this menu. You don't necessarily need to worry about all the options, but the most important ones I will explain. "Wireframe" is the default view for the Top, Right, Back, and Left viewports. The "Other" option gives you additional display options (I'm not going to explain them all - you can experiment and see what they do). If you uncheck "Show Grid", the grid lines will be hidden - unless you really want to do this I wouldn't recommend it. The "Views" option will let you pick from all of the different available views (the only views you need to concern yourself with at this point are Front, Back, Left, Right, Top and Perspective - but you can choose to see your model from perspective of one of the cameras, or lights, or anything available). The "Configure..." option will take you to the same window as Customize >Viewport Configuration... You can play with that to see what it can do, but it's not really necessary.
    How To Select Objects

    (selected objects become highlighted in white)
    Click on individual objects--using the cursor, click on individual objects in one of the viewports - if you hold down "Ctrl" on your keyboard, then you can click on multiple objects to select them (if you accidentally select something you didn't want to pick, simply click on it again with the "Ctrl" key still held down. Drag Select--hold down the left mouse button in a viewport and drag a box around the object(s) you want to select - when you release the mouse button anything within the box will be selected. Select By Name--press the "H" key on your keyboard (this is know as a "hotkey") and it will give you the "Selected Objects" window (above right)--you can choose to hide things you don't want to see and use standard Windows list selections (discussed below) to pick from the list--notice that you can select by name (type what you're looking for in the blank box above the list), so name everything. Windows Selection Methods "Shift" select - hold down the "Shift" key and either use the arrow keys or cursor to move up/down the list (you must have at least one object already selected in the list) - this is a "sequential" selection "Control" select - hold down the "Ctrl" key and click on names in the list - very useful if you want to select multiple objects that are not listed sequentially.
    Quick and Dirty Guide to Basic Geometry Part 2

    (3d World) This is a rough approximation of the 3 dimensional world. Keep in mind that here, the 2d world (that of the X and Y axes - also known as "the ground") lays completely flat, but it retains the same grid point system. Unlike the 2d world, however, the 3d world also adds the Z axis, which moves up and down above and below the 2d world. This also adds another value to the point system.
    Anytime you move "up" (above ground), Z is positive. Also, whenever you move "down" (below ground), is negative.
    So, in this system, if you wanted a point that was 3 spaces to the right, 2 spaces back, and 5 spaces down, you'd represent it like this: (3,2,-5)
    This is the world you will be dealing with in the Front, Back, Left, Right, and Perspective viewports.

    Think about it like this: If you wanted to move a wall to the right, 8 meters, you'd make X = 8. If you wanted to move the same wall backward 16 meters, you'd make Y = 16. If you needed to move that very same wall 3 meters into the air, you'd make Z = 3. This example would also be expressed as: (8,16,3)
    Keep in mind that even though the Front, Back, Left, and Right viewports look like the 2D world, they are in fact a flat representation of the 3d world. Don't worry too terribly much about keeping this completely straight - if you ever get confused, the little X, Y, Z thing in the lower left-hand corner of the viewport will remind you which way the axes are oriented. I hope this didn't confuse anybody, but I think at least this basic understanding of geometry is very important if you want to model in the 3d world. I'll try to explain it the best way I can as we go along, and it'll eventually become second nature to you.
    NOTE: One tile in SC4 is 16 meters by 16 meters. This means that if you want your building to be a certain size, you will need to keep this in mind. For example, if you want the building to fit one a 2x3 tile, then it would need to be no larger than 30 meters by 46 meters (2 meters subtracted from each side as the Lot Editor does not allow overlap on buildings). Please keep this in mind as you are modelling--nothing is more heart-breaking than exporting your model only to find it's way out of scale. It is possible t scale the entire thing later, but that can become extraordinarily tedious and can be avoided by keeping this in mind at all times.
    If you zoom out far enough in the viewports, the smaller "blocks" (the 1 meter boxes) will disappear and only show the larger "blocks" (the 16 meter boxes). This is very important to remember because when you first open the BAT, this is how the blocks will show (only the 16 meter boxes will be seen). If you model to the grid like this, you're building will be HUGE.
    OK, enough preaching.
    I was in the National Guard at one time, so my motto, like so many in the Infantry, is K.I.S.S. ("Keep It Simple, Stupid"). There is no need to make anything more complex than it has to be, and the simpler I keep something the better for my wee little brain. I refer to this concept often, so just forewarning you!
    You're now ready to start modelling your building!
    There have been many tutorials, explaining things in many different ways. It can become confusing. I tend to model with "extruded splines", so that's how I'm going to explain it to you. Hope it doesn't confuse anyone.
    Before getting started, it's a good idea to sketch out your idea (or, if modelling from a real-life building, make sure to have plenty of pictures and facts about it available). I usually don't sketch anything out as I prefer for my building to grow "organically", but I will at least have a general idea in mind.
    When I first began modelling, I always kept a notepad file open with the dimensions of everything I modelled. I know, that's very tedious and anal, but it really helps. Trust me, when you get part-way through a building and forgot how large the front windows are, or how wide that loading dock door is, or how tall the building itself is, you'll be kicking yourself for not jotting it down for easy reference. Besides, with more experience, you can always "eyeball" it later. I do NOT recommend eyeballing it when you are first starting out - you might be heartbroken later on when something didn't turn out exactly right (trust me on this - plenty of heartbreak here) and you'll spend a lot of time guessing at things and not actually modelling.
    Let's get to it, shall we?
    The building we're going to create, "BAT Tutorial, Inc", is going to fit within a 3x3 lot in SC4. Why 3x3 you ask? Well, because it's my tutorial and I can make whatever I want, and (even better) buildings scaled this size are small enough to be actual businesses without losing the details you're going to be toiling upon - oops, i meant "working on", Vu Industries slipping through there, sorry bout that! Besides, I think 3x3's are perfect for a small business (gives you plenty of room for detailing the lot - like parking lots, which take up an entire tile by themselves). The building itself will be 1 tile wide by 2 tiles deep. This means that it can't be any larger than 16 meters by 32 meters (don't worry, when you start modelling your buildings, you can fudge, and add a little here and there, just remember to not get too carried away or else you'll end up with a 12x12 before you know it!).
    Do not "model to the grid" (in other words, don't base your building on the grid lines you see when you first open the BAT). When you first open the program, the viewports are zoomed out far enough so that each box is 16 meters square instead of 1 meter. Don't say I didn't warn you.

    We're going to create the front wall first. To do this, we're going to create a rectangle by clicking the "Splines" button, then clicking the "Rectangle" button. The cursor will turn into a cross-hair when you move into the viewport (gmax is telling you that you can now create a spline). Within the "Front" viewport, click and drag a "box" of any size (do not get all caught up in creating the perfect size right now - it can more easily be changed after creation). Now, gmax will helpfully name it "Rectangle01" and give you the current size in the "Parameters" rollout. Since this building will fit within a 1x2 box in SC4, we'll need to resize it. MaxisBrian suggested that to model buildings with "normal" ceilings to make the walls 4.5 meters tall. Since this will be a business, and most businesses have taller ceilings (not to mention it makes everything nice and even), change the Length to 5 and the Width to 16. Since the settings are correct, any number you type in a box like this is already set to "meters". That's what was meant by "1 Unit = 1.0 meters".
    NOTE: The BAT will create the object directly on top of whatever axis you're looking directly towards. So, if you are in the "Front" or "Back" viewport, the object will create with it's Y coordinates at 0. If you're in the "Left" or "Right" viewport, then it will created with it's X coordinates at 0.
    At this point, you will need to rename your object. I have my own particular naming scheme of object type-object name. This way, it's much easier to find by name later (if you're looking for the left wall, you'd go down the list until you find "Wall - Left"). You can also define it's color if you'd like. It's not too terribly important, but it can help the object stand out (and give you an idea of your color scheme for later). This object will be named "Wall - Front".
    NOTE: I can't stress this enough: NAME EVERYTHING. Even if you don't feel like it, even if it's too hard. For the sake of your own sanity, give everything a name. You'll thank me later when you have literally hundreds and hundreds of named objects to sift through to find that front door frame.

    To keep everything as simple as possible, it's best to move your rectangle so that it's centered. Select your rectangle (click on it in the "Front" viewport - unless it's already selected), then click on the "Select and Move" button. Now, make X = 0, Y = 0, and Z = 2.5. Whenever you move something around in this manner, it's helpful to remember that this will move the object relative to it's center (with a few exceptions, but I'll mention those if and when it comes to those objects) - meaning that these coordinates put the center of the rectangle at zero on the X and Y axes, and 2.5 meters in the air. Didn't ya just know all that math you learned in school would be good for something one day? Don't worry about the "building needing to be centered on X and Y for export" at this point - it's very simple to do later, and this will make modeling much easier for you.

    TIP: When you're moving things around, sometimes the objects will get out of view. You can easily re-center the viewports on the selected object by hitting the "Zoom Extents all Selected" button.

     
    Now, we're going to create a door. Simply create a rectangle in the front view (since the wall is sitting directly on the X axis, the door is already sitting in the wall) and adjust it's Length and Width like so. The settings for this door are not exactly to scale, but this makes a good-sized doorway for a double-door, or an entrance into a foyer. Notice I didn't change the name or color of the object? I'll explain in more detail later, but trust me, it's not necessary. Now, using the "Select and Move" button and the X, Y, and Z boxes, move the door to X = 0, Y = 0, and Z = 1.8 (this centers your door on the wall and makes it 0.2 meters off the ground - half the door's height plus the 0.2 meters). I trust that you know what that'll look like, so I won't post a screenie.
     
     
     
     
     

     
     
     
    Now, we're going to make windows for this wall. Still in the front view, create another rectangle and set the Length and Width thusly. This one is also probably not to real-world scale, but I think it'll look nice when all's said and done, so there. LOL. (Not to mention the fact that it will make everything much simpler.)
    This is where the settings for the grid come in really handy. Notice I made the window exactly two meters wide? Using the grid behind it as a reference, click on the "Select and Move" button to line it up with the grid lines like below:
     
     
     
     
     

    Notice how the X and Y arrows have changed? Y will always show as a green arrow, Z as blue, and X as red (unless there's some place I overlooked that lets you change their colors). If you hover the pointer over them, the bar below/beside the point will turn a different color, indicating it's "active". When this happens, you can left-click and hold, then any movement you make will be restricted to that axis. In other words, the way it is now, no matter which way I move the pointer, the object will only move up and down. Very, very useful. This is true regardless of the viewport you're currently in, including "Perspective".

    What kind of office building would it be with just one window on the front wall? To fill in the remaining space, you'll need to make more windows. There are at least two different ways that I know of. "Array" (the button that looks like a dot with several spheres around it in the Main Toolbar) and "Clone". It's not necessary to array here, as there are so few windows (but I will get into the Array tool sometime later). What you're going to want to do is "Clone" your existing window to create an exact copy.
    There are two ways to accomplish this. From the Menu Bar, you can go to Edit & Clone (sometimes very useful), but that creates a copy directly on top of the existing shape. The easiest way to make a clone in this example is to hold down the "Shift" key on your keyboard, then drag the rectangle (it helps to use the movement technique described above for this so you don't have to re-align your windows vertically). Take note that there will be the outline of the new object while you move it. When you release the left mouse button, gmax will give you the window below.

    Don't go and get all click-happy here, you have an important choice to make. If you choose to click the radio button next to "Copy", then the new object will be an exact duplicate of the object selected. If you click the radio button next to "Instance" then it will also be an exact duplicate, but any changes you make to the original also affects all instances (copies) of it. In other words, if later you decided this window should be 1.5 meters wide instead of 2.0, then you only have to change the original and not each and every single one. Extremely useful for a large project.
    You also have the option to make more than one copy, but I wouldn't recommend doing that unless you really, really want to. Also, if you choose to, you can change the suggested name that gmax gives at this point. After all those decisions are made, simply click "OK" or hit the "Enter" key on your keyboard and your copy is created. Conversely, if you hit "Cancel" or the "Esc" key on your keyboard, the action is cancelled and no copy created.
    You don't have to make all of the windows copies of the first one. Unlike the real world, it doesn't hurt to make a copy of a copy of a copy of a copy... You can simply clone the last object you placed so you don't have to click and drag all the way over to the other side. Did I mention I'm also lazy?
    TIP: It might be useful at this point to make a clone of one of the windows and put it off to the side. Since these windows are simple rectangles, you don't absolutely have to, but it will save you from having to create it all over again later on...... I did mention I'm lazy, right?
    Got it so far? Ready to go on? Good. Now we're getting into the fun stuff.

    The first thing you're going to want to do is "collapse your object to an editable spline". Huh? What did I say? Don't worry, that blank stare you probably have right now is exactly how I felt the first time I saw that in print. To do that, select the "Wall - Front", go to Modifiers Patch/Spline Editing Edit Spline. The Command Panel will change to this:

    Whoa! There's a whole lotta stuff there, huh? Don't worry, most of that is not anything you need to concern yourself with (at least, not until you get closer to claiming "expert" status on the BAT). The only two buttons you need to concern yourself with right now are "Attach" and "Attach Mult.". If you click on "Attach", then you can go into one of the viewports with the pointer, which will turn into a funny-looking cross hair with bubbles around it (can't get a screenshot of one, but if you try it you'll definately see what I'm talking about,) when you hover over an object. That can be very useful, but a little tedious. Instead, we're going to click on "Attach Mult.", which gives us the next window:

    From here, you'd select the splines you want to attach. Notice I didn't pick "Rectangle06"? All that we want to attach to this wall is the windows and doorway. Rectangle06 is the last copy I made of the window and put off to the side. If you attach it, strange things will happen when we get to the next step.
    - Be sure not to attach it. -
    Once you have everything selected, click the "Attach" button or hit the "Enter" key on your keyboard.

    *Poof* The BAT has now made all of your other objects a single object. This is why renaming the windows and doorway was unimportant before. Since they have all now become one object, they will take on the name and color of the spline with the "Edit Spline" modifier on it. At this point it might be wise to rename the extra rectangle as "Windows - Opening".
    That wall doesn't look very much like a wall, does it? We'll take care of that in the next step.
    TIP: If you're ever confused as to which direction X, Y, and Z are (they are constants, but in a 3D environment such as this, it's easy to get turned around), the little bugger in the corner of the viewport helps tremendously. It shows you which axis is which in the current view. Take note that is independent of the X, Y, and Z displayed with the "Select and Move" tool - those are dependent on the view that you're in. This is because for "Select and Move", the orientation of X and Y is based on the object and not the real world. A little confusing, I know, but play with it for a few minutes and you'll see what I'm talking about.

    Now you want to "slap an Extrude Modifier on it." Basically, go to Modifiers, Mesh Editing, Extrude.

    Surprised you, didn't it? Shocked me when I first saw it, too. No worries, though, all you have to do is change the "Amount" to something more appropriate. To give your walls some "depth", my suggestion is 0.3 - in real-world terms this means that your wall is 0.3 meters thick (or for we Americans who *refuse* to learn the metric system, that would be 0.98 feet - but because I'm lazy we'll just call it 1 foot). I know what you're going to say - "But phillippbo, we're not making a bunker, we're making an office building. Why is it so darn thick?" Simple. In SC4, there are some things that need to be exaggerated or else they don't show very well. Trust me on this one, 0.3 is a minimum for wall thickness.

    Congratulations! You have now successfully made the front wall with it's appropriate openings. Now, go to File & Save As... and save your model. With all the horror stories I've heard about the BAT, make sure you save it often. It might not be a bad idea to also save several copies (put one on your desktop, on a diskette, or if you have a burner onto a CD-R). This way, if something goes all buggy and your file becomes corrupted, then you don't lose but so much work.
    I save all of mine in the "gmax/Scenes" folder instead of the "gmax/gamepacks/BAT/scenes" folder. Some people have mentioned that their files have become corrupted saving them in the BAT/scenes folder, and none of mine have yet, but you never can be too careful!
    Creating Walls B - "Completing the Building"
    Now that you've got the basics down for creating wall with extruded splines, we need to round out our building. Some people model one complete wall at a time, which is fine if you're modeling after a real-life building. I'm not saying there's anything wrong with that. This is not how I model, however. I think it's best to get the basic shape down, then add detailing to it later. Alrighty then - are we having fun yet?

    As you'll recall from before, this is where we left off. We're going to need to make some more walls! I'm going to make the back wall next. You actually have two choices here: create an entirely new wall or clone the existing wall and move it back. For the sake of simplicity, I'm going to clone the front wall.

     
     
    Since I already know how far back I'm going to move the wall, I'm not going to use the "Shift/Clone" method. Instead, I'm going to use "Edit > Clone" method. You get the same clone window, but this time it's important to pick "Copy" instead of "Instance". This will become important in a few minutes. Be sure to rename your wall "Wall-Back".
     
     
     
     


    To move your wall, we'll use the "Select and Move" button. It is not necessary to select your new wall is it will already be the wall selected. Make Y = 32 and hit "Enter" on your keyboard. Your wall will now be moved back 32 meters.
    Note: Notice how the grid lines become darker every 16th box? This is one reason it's very important to make sure the settings in the BAT are correct. With it like this, you can easily see the scale of your building because each darker box represents one tile in SC4. (I zoomed out in the top viewport to show you.) See how the front wall extends out from the X axis instead of going behind? This is not too terribly important but to keep with my K.I.S.S. theme, I'll show you an easy way to fix that. First you'll need to select "Wall-Front". Then you'll need to change the Extrude modifier... wait a sec. What?
     
     


    Seems that all of our options are gone. I guess we'll just have to create the wall all over again....
    .....unless you want to use the method below:

    In the Command Panel, click on the "Modifier" tab. This is actually where most of the rollouts you'll be working with are. Now we can see our extrude amount and change it. Remember how our wall extended out from the X axis? It's a quick fix, simply change the extrude to -0.3 so that the extrude reverses itself.

    Whew, that was a close one. Don't even have all four walls up yet and already having problems.
    I don't really think that I want the back door looking exactly like the front, so we're going to change this. Remember this is only one way to do it, but if I tried explaining every single possibly way to do something this tutorial would have never been finished.

     
    The front wall is going to be in our way. You could simply move it, but then you'd have to move it back. I'm lazy and don't want to go through all of that trouble. Instead, I'm simply going to hide it so it's not getting all in my way. Do this by selecting "Wall - Front" and right clicking. It gives you the above menu. You can do many, many things from here, but we're simply going to use the "Display" functions (the greenish color). If you pick "Hide Unselected", everything but the currently selected object will disappear from view. That's not what we want, so we're going to pick "Hide Selection" so that the front wall will disappear from view. (I'm sure you can picture what this will look like - so no screenie for this either - you don't really want me to burn out my copy of Fireworks, do you?)
     
     


    To make changes to the existing object, we'll need to edit it. Select "Wall - Back" and go to the Modifier Tab. In the modifier list, click the plus beside "Edit Spline" to display the edit spline rollout. Select "Segment" so that we can move the sides of the rectangle around (notice you can also use the buttons in the "Selection" rollout below). If you choose "Vertex" you can move individual vertices (corners) of objects around and "Spline" lets you move entire rectangle around.
    Now, the back wall should look like the above picture (sorry about the lack of white lines around the edges of the wall in the front viewport - happened when I resized the picture). Using the "Select and Move" tool, you can either eyeball it (ugh), or you can type values in X, Y, and Z. Since I'm going to make this door narrower, I'll pick the right-hand side of the doorway (whichever segment, vertex, or spline is currently selected will show in red) and in the X box replace 1.25 with 0.75. Now, select the opposite side of the doorway. Notice the value for X is now -1.25? Geometry, gotta love it! This time, replace the -1.25 with -0.75. This makes the door 1 meter narrower - perfect for a single door. Now, you'd click on "Extrude" in rollout to finish editing your object:

    You can now unhide your wall (right click in the viewport and pick "Unhide All") and zoom back out to see your creation.
    The next step is to create the side walls. Again, there are many ways to do this, and I'm only going to explain one of them. Create a rectangle just like you did for the front wall, but this time do it in the left viewport (to get back to where you can create a spline, pick the create tab - directly to the left of the modifier tab - and click on the splines button):

    Don't forget that we're going to have to re-size this wall (make the settings like above - the walls are 5 meters high and the building is 32 meters long - still have your notepad file open?). Rename the wall as "Wall - Left". Also, don't forget that this wall is sitting directly on the Y axis. Using "Select and Move", change it's position thus.
    I'll explain the X, Y, and Z to make sure you understand why we're setting them like this (remember that when using typed-in values like this X is always side to side movement, Y is always front to back movement, and Z is always up and down movement). If you really don't want to know why and just want to keep modelling, skip past these next few screenies.

    First of all, we need to move the wall out to the where it should be on the left-hand side of the building. Since the center of the wall is sitting at point 0 on the X axis, we'll need to move it left by half the length of the front wall (the front wall is 16 meters wide, so we need to move the side wall 8 meters). Remember my quick guide to geometry on the "Getting Started" page? Because we're going to be moving to the left of the origin, X would be negative.

    Next, we'd need to line it up properly with the front and back walls. Since we are moving the wall backward and going above the origin (in the 2d world), we would change Y to be a positive number. Since we're moving the middle of the wall halfway between the front and back walls, Y = 16. Lastly, just like the front walls, we need to put the wall so that it's sitting on the ground, so Z = 2.5.

     
    Jeez, that math can really get tedious, huh? Don't worry too terribly much if you don't get it right now, I just wanted to put that information out there to try to help everybody understand why the system is the way it is. Take a breather, you need it!
    Moving right along, remember that window I had you clone way back on the last page? You'll find out why it's important now. Instead of having to create new windows, all you have to do is pick your window (you don't need to make another copy of it - this is what we needed it for) and rotate it 90 degrees. To accomplish that, press the "Select and Rotate" button, then type 90 in the Z box. Remember, if you put a negative number here, the object will rotate clockwise. If it's a positive number, it'll rotate counter-clockwise. For this object, that's not important at all (but it will be important if you are going to rotate 3d objects). Also, if you move the pointer over one of the arrows, it will turn into a circular arrow. Just like with the "active arrow" method on the last page, these arrows will also change colors when they are "active". When the arrows are active, you can left-click and drag the pointer up and down to rotate manually. Very useful when trying to get perfect alignment, not so useful when you're trying to rotate by an exact amount.
     
     
     

     
     
     
    Remember the tip I gave you on the last page about the "active arrow" movement (where all movement is restricted to whatever arrow is colored differently)? This is where it can come in handy. Make sure you select the "Select and Move" button - otherwise you will rotate the window when all you want to do is move it. With that method, the only thing you will need to do manually is move the window opening back until it lines up with the grid just like on the first wall.
     
     
     
     
     
     
     

     
     
    "But, phillippbo," you ask, "it's still way out from the wall. I thought you said that'd do weird things when it comes to extruding?" You are very correct. What you will need to do now is type the same value for X that you have for Wall - Left (-8.0). Now the window is sitting perfectly on the wall.
     
     
     
    Ok, so at this point you have a side wall with one bitty little window in it. That just won't do. You could use the same method we created the front windows, but there's gonna be so many of these. I'm so lazy, I don't want to do that. Instead I'm going to use a handy little tool called "Array". Make sure that you are in the Left viewport, and, with the window opening selected, click the "Array" button in the Main Toolbar. It will give you the window above. Now enter -3.0 for the X box beside the number one, make sure that the radio button is selected next to 1D, and make sure the "Count" boxes are like shown. You'd then hit "Enter" to change the "Total in Array" box or OK to create the windows. Take a look at the "Total in Array" box (number 5). This will tell you how many objects you are cloning, and can be extremely useful.
    NOTE: Just like with the Clone tool, you can choose to make copies or instances here.
    Numbered items 1 and 4 are all that we are worried about right now, but I'll explain all of them (for items 1 through 3, only worry with the "Incremental" column for now):
    NOTE: "Array" is one of the tools where X and Y are no longer constants in "real world" terms (like my geometry lesson) and are based on the viewport that is currently active. Based on the view that's active (as far as gmax is concerned, that's your "perspective"), X will always move left (negative numbers) and right (positive numbers) and Y up (positive numbers) and down (negative numbers) when you're using 1D cloning. It's a little much to explain here, but 2D cloning is a bit different.
    Move - indicates how far you want each copy to move - based on the object's side. For example: if you had a square that was 3 meters wide and you wanted each one to be 1 meter apart, then you'd enter 4 here. Rotate - tells gmax what kind of "spin" you want to give the cloned objects. Haven't played with it much, but it can be very useful if you master it. Scale - indicates how much you want to scale the cloned objects. The number you type in here is a percentage. For example: if you wanted each copy to decrease in width by 25% each time it was copied, you'd enter 75 in the X box (you're telling gmax that you want each copy to be 75% of the width of the previous copy). Can be very useful, but I haven't found a use for it yet (at least, not in any of my buildings). Array Dimensions Box - how many copies you want to make. For 1D, it's how many you want created across (in this case, we're making 10 windows). For 2D, it's how many up/down. And 3D does some interesting stuff (I over-simplified what 2D does - but that's not important right now). Don't worry if the above seems a bit much. It took me about a week of playing with the "Array" tool before I could figure out what it did. I've only given you a basic idea of it's function here, it's a very powerful tool that could be a tutorial in and of itself.
    Enough of that, on with the tutorial!

    Now you have your 10 windows going back along the wall.
    Whoa there, partner! See that unsightly gap at the back? Normally, I'd go through the effort of playing around with the window's width or the array distance until I got it pretty darn close to perfect. Since I'm trying to keep everything as simple as possible, however, we're just going to leave it. Besides, I can use that to show you an important lesson later. What you'd do now is put an "Edit Spline" modifier on "Wall - Left", attach all of the windows, and extrude by -0.3 (this prevents the wall from extruding out from its current position). Then, you'd clone an instance of your wall and put it on the opposite side (change X to 8.0 and change your extrude to 0.3 to make the wall extrude inward instead of outward). Don't forget to rename the new wall "Wall - Right". You should now have this:

    Don't worry about all that silliness at the corners where the color is bleeding over. As long as you use the same texture for the side walls as the front, that shouldn't show. Congratulations! You now have four walls with all the appropriate openings.
    Important Detailing: Windows, Doors, and the Roof
    So, now we've got four walls, but we're far from done. Now, we're going to add some details to make our building begin to look like an actual building. I'm going to start with the roof.


    In the top view, create a rectangle of any size, then adjust it's length and width like shown (this will make it the exact same dimensions as the building without having to make hairy adjustments - see, It's a Good Thing™ that I had you make sure the walls extruded the way they did). Now, to center it, set X and Y like shown so that the middle of the rectangle is moved to the center of the building. Just like we did for the walls, place an Extrude Modifier on the rectangle and set it to 0.3. Since we want this to be on top of the wall, make Z = 5. Rename the rectangle "Roof - Surface".
    Farther down the page, I'm going to show you how to make transparent glass. Because the windows will be transparent, we're also going to want a floor in this building. To do this, make a clone of the roof, rename it "Foundation - Floor", and make it's Z = 0. You'll end up with the picture below:

    Next, we're going to make doors. For this step, it's very helpful to hide anything you're not working on. Since we'll be working on the front door, select "Wall - Front" and "Hide Unselected".
    Next, you going to want to turn "3d Snap" on. It's actually pretty simple to do this, click the button shown below.
    NOTE: The 3d Snap button has more than one option: 3d Snap, 2.5d Snap, and 2d Snap. The only ones you'll be worried with are 3d and 2.5d. See the picture below for an explanation about their differences (just remember that if you hold down the mouse button, a little window will pop up giving you the different options).

    Click the "3d Snap" button down near the Z box, then go to "Grid and Snap Settings" (Customize >Grid and Snap Settings...) and pick "Vertex". There's a lot of options in this window, and most of them are self-explanatory. Just be sure that when you close this box that you use the "x" in the upper right-hand corner. Do not click the "Clear All" button unless that's what you really want to do (don't laugh - we've been trained by Windows to hit "OK" or "Cancel" inside windows like this - it's very easy to hit it without thinking about it).


    When you create geometry with the 2.5d Snap on, it does line it up with whatever you were "snapping" to, but gmax creates the shape on the X or Y axis (depending upon which one you're looking directly towards). With 3d Snap on, gmax does the same thing, but this time places the vertices of the rectangle directly on top of the ones you are snapping to. Don't worry, I'm going to show you "snapping" in more depth below, just remember that 2.5d puts it on the axis, 3d puts it on the object.
    Back to creating the front door.

    After you click the "Rectangle" button, and before you actually create the object, go into the "Mesh Settings" rollout (you will probably have to click the "+" symbol next to the name) and check the two boxes shown. These boxes will make sure that the rectangle you create will not be a simple rectangle, but will be rounded like in the 2.5d and 3d Snap pictures above. The default thickness is 1.0, but we definitely don't need a shape that thick (or else nobody would actually be able to fit through the door). Change the thickness to 0.3. A little note about the "Sides" option. The way it's set now, the "tube" that makes up the sides of this rectangle will have 12 faces. If you are going for a rounded look, you'll need to put at least 10 in here. If you're looking for something a little more squared-off, then anything less than 6 will do nicely, but there is a minimum of 3 sides (it takes at least 3 faces to make a 3d object). Don't worry, if you put anything smaller than 3 here, gmax will change it for you.

    In the front view, move the cross-hair around until you get a blue cross on the top-left corner of the door opening. Gmax is now telling you it's going to "snap" to that vertex.

    Drag your rectangle until you get the blue cross on the lower right-hand corner of the door opening, then release the mouse button. Rename the rectangle "Doors - Frame Front".
    NOTE: Anytime that I say "snap a into ", I'm talking about doing what I just showed you.
    Lastly, we're going to give this frame the illusion that it's actually a door frame and not some kind of decorative piece. In the top view, zoom in on the door opening and drag the door frame backward until it's outside edges line up with the front and back faces of the wall.

    VERY IMPORTANT NOTE: In order for any geometry created like this (by clicking the two boxes) to show in the final render, you will have to "collapse to an editable mesh". (Go to Modifiers >Mesh Editing >Edit Mesh).

    Now, to create the door for this wall (there can be many ways to do this, I'm just going to show you a very simple way right now), repeat the above steps (you may want to hide the door frame so the rectangle doesn't try to snap to any of the verticies on the frame - just don't forget to "Unhide All" after you're done with the door itself), but this time be sure to uncheck the "Generate Mapping Coord." and "Display Mesh" boxes after you've created the new rectangle (make sure your door frame is not selected when you do this) so it will be a simple rectangle. In the top view, you'll want to move your new door so that it's centered (front to back) in the frame - with 12 sides on the frame its really easy - you'll see what I'm talking about.
    Rename the rectangle "Doors - Front".

    Be sure to add an Edit Spline modifier to the door (that way, it's easier to change later). This isn't completely necessary at this point, but it would be a good idea to go ahead and put a UVW Map on this rectangle (Modifiers >UV Coordinates >UVW Map). We aren't going to be texturing it just yet, but when you put the map on it, the door itself gets "filled in", like so:

    The next thing to do would be to create windows. Just like I said before, there are many, many ways to accomplish this. For the sake of K.I.S.S., I'm showing you one way.

    First, you'll want to snap a rectangle in the window just like we did for the door frame, but this time we'll only have the thickness set to 0.2. Why, you ask? Simple, how many window frames have you seen that are the same thickness as door frames? (Don't answer that, I'm sure you could prove me wrong.)
    Rename the newly created frame "Windows - Frame".

    Next, we're going to create a spline line to act as the "divider" between window panes (you know, where the lock always is). The easiest way to do it is snap a line across the top of your window opening (you may want to hide the frame so that you don't have any trouble - just "Unhide All" when you're done with the line). Keep in mind that when working with lines, unlike most other shapes, you don't click and drag. Instead, you only click when you want gmax to put in a vertex. Therefore, be sure to click when the "blue cross" comes up for each of the top corners of our window opening. Since gmax will let you put in limitless verticies, it will have the next vertex showing, ready for clicking and placement. To avoid making any more verticies, hit the "Esc" button on your keyboard.
    Don't forget to "Unhide All" to allow the window frame to show, if you hid it before.
    Next, move the new line down until you get it where you want it (it is OK to eyeball here).

    Now that you have the line in place, put an Edit Spline Modifier on the "Windows - Frame" and attach your line (just like we did when we attached the window and door openings to the walls). It will now become one object. Don't forget to add an Edit Mesh Modifier to your complete window frame, or else it won't show in the render. Make sure you do that now because you'll kick yourself if you don't. This building is only going to have 28 windows, but a medium-sized office building could have hundreds - meaning a lot of tedious work for you later if you don't take care of that now. Just warning you (trying to save everybody some of the heartache and pain I've gone through). Ok, ok, enough of the preaching. The next thing you'll need to do is snap another rectangle (again, hiding the window frame can be useful) in the same opening, uncheck the "Generate Mapping Coord." and "Display Mesh" boxes after the new rectangle is snapped, apply a UVW Map to it, and rename th...
    Editor's NOTE: The final text for this tutorial has been cut-off/lost at some point. Hopefully it can be restored in future. In the meantime, here is the basic version of what you need to do:
    Apply the UVW Map to the Window, giving it a new name. Copy this new set of window shapes (after attaching them together) to all the other windows. All the information to clone items in this way, including rotating them can be gleaned from the rest of the guide. Once you've got all the windows in, named them appropriately and ensured each one has both a UVW Map and a Mesh modifier applied you should be good to start part 2. Links to other parts of this tutorial: part 2, part 3, part 4
  25. nos.17 liked an article by rewright, Building a more realistic highway interchange...   
    To build this interchange you will need the NAM and a slope mod. I use BRF_TunnelAndSlopeMod-bJERONI.