Jump to content
Sign In to follow this  
DarkMatter

DatGen Plugin: HotKey Editor!!

18 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 
Ok everyone, its finally here. The first hotkey editor for SimCity 4. This is a DatGen plugin, and you will need DatGen v0.2.9 to be able to use it. Both the plugin and DatGen are available on the mods section here on simtropolis.
 
This is a beta release, as I havn''t fully tested it yet, but it should work well for the most part. If you find any bugs, post them here and I''ll fix them ASAP. Currently you can only edit existing keys, not add new ones. I''ll add the ability to create new keybindings in the next update. There is a fixed set of actions that you can bind a key to, so don''t expect that this plugin will let you create keybindings to do things that you can''t already do. All this plugin does is let you change what keys are bound to an existing action.
 
The readme in the .zip explains how to install the plugin, and set it up so you can use it stand-alone, without DatGens interface in the way. Enjoy everyone! :D
 
/idealbb/files/hotkeyeditor.jpg

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Woo. Great work as always DM. I'm sure lots of people will be glad to have this 1.gif

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 
Cool!  Can you make the shortcut command last only as long as one holds the button, and as soon as it is released, go back to the previous command?
 
Ex. while zoning, press control to destroy things, and when control is released, automatically go back to the zone command, like in SC3K.

SC4, Forevermore!

Currently preoccupied with architecture school...lurking with caution.

Share this post


Link to post
Share on other sites
Posted:
Last Online: A long, long time ago... 
 
HALLELUAH! (excuse my poor spelling)
 
Everyone though it was hardcoded, but now we know it's not. Not that it matters to me, I'm not very good at modding, but still...

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Looks Good! This is what i've longed for...

BTW, This works just as key stroke re-mapping plugins
But I wish it can understand last key..

For example, Simcity uses "R" is for road, "Alt-R" for street, "Control-R" for Avernue, etc ...
I like to build all kind of roads with just "R" key.
Typing "R" will show "road" cursor. anoher "R" will change it "Street" cursor.
Another "R" will change it "Avernue" cursor. Yet another "R", then cursor will change it back to "road" ( ie each time I type "R" cursor will cyle thru "road" -> "street"-> "avernue" -> "raod" -- back again.)
I built "street" with two successive "R" key, Then I use oher keys. ( build residential zone with "Q" key.), Then I type "R". then it should recall last road type I used and set cursor to "street"(last built load-type), instead of "road".

By remembering last used building/key type, we can build low-density residential("Q"), mid-density residential ("W"), high-density residential ("E") zone with just one key ("Q"). Each time I type "Q", cursor will cycle thru "low/mid/high" density residential zone cursor.

Another example: In God mode, Shift 0-9 selects terraforming cursor radius, but whenever I change tool selection, cursor radius resets to default size.
So each time I change tool, I should set cursor size again.
I wish that each time I change tool selection, cursor should remember size used last time.

I wish this program have very specialized features for Simcity playing, not just working like general key re-remapping / macro programes.

Another suggestion:
Mapping key stroke to not to another key but to mouse movement and click.
If I use the fincial stat screen very freqently ( which has no Hotkey, it can be displayed only with couple of mous click), assign such mouse click to a key (let say "F" key). When I type "F", then the plugin simulate mouse clicking then I can see financial stats with just one key stroke.






Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Unfortunately that's not possible. All our programs can do is use stuff which is already created by maxis

All that was created by maxis is a way to control what keys do what through the simple mapping the program currently uses. There is no cycling or last keys programmed into the game, so its impossible.

This program takes complete control of the current allowed functions of the hotkeys though so you can do anything Maxis can without changing the code 1.gif

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Hmmm. I see.
This plugin just manipulates internal tables used for key stroke to specific function associations in Simcity programe itself.
So, to implement such featues that I suggested, I need separate programing with genuine Direct-X key remapping/macro capabilities (DirectInput to be specific).




Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

Yea. To attempt what you're talking about I think somebody would need to be an expert in assembly code, and find a way to actually modify the exe with new functions. That's something nobody on this site has ever looked into yet though.

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    To reiterate, this is just a hotkey editor. Its not an action creation tool, it just lets you edit what keystroke or keystrokes are associated with an SC4 action. The total number of SC4 actions is fixed as far as I know, hard-coded into the simcity 4 .exe. I don't think that SC4 makes any use of pre-made key handling mechanisms in DirectInput, and therefor, we have no way of hooking into it. Hell, hooking into SC4's implementation of anything is quite well and far beyond our abilities right now, probably forever. All we have the capability to do is edit .dat files and the files contained inside them. Keybindings for SC4 are just handled by simple text files that follow a simple but specific format. This hotkey editor makes it easy to edit those hotkeys and save them to a new file.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    How do I use this plugin? I recieved it as part of the complete DatGen download, and have really no idea how to use it. I've searched for a readme file, so I apologize if I've overlooked it somewhere.

    I tried loading SimCity1.dat and opening the editor, but when I select a defined key only the key combination field is filled in. What procedure should I use to load the hotkeys?

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online: A long, long time ago... 
     

    Pkmn, that annoys the hell out of me. Where is there a rule against posting in an old thread? If you have a question, why NOT post in an old thread? The question will eventually be answered, and then the thread will fall again.

    That's the whole point of a thread. You start the thread, define the discussion topic, and ANYONE is free to post a question, comment, or tip (within acceptable limits), whenever they want, about whatever they want within the topic.

    Jesus . . get over the fact that the NAM - General Discussion thread moves one slot down.

    Thalassicus, DM checks the modding boards regularly, and you should be in contact with him either today or tomorrow.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Hi all, I might be missing something but I tryed to find the link to down load the Hot fix key mod but can't find it under the mods I have the datGen 0.6.0b allready downloaded. is thier another place it can be found? and also the higher virsion of datgen doesnot show up when I check the mod section. what am I missing?



    By the way I have almost all Darkmatters Mods and want to thank you for all your hard work you put in to making the stuff you do. It is people like you and so many other that make this game a joy to play. THANKS TO ALL OF YOUS17.gif

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    actually Arcedila, it's against forum courtesy to revive old threads... since this thread was 10 months since last post, it would be qualified as dead. I'm sure there's a few notes on reviving dead threads in the forum guidelines.
     
    so I'd go with pkmn's advice... just PM DarkMatter...

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Well, my reasoning was that I had 3 choices: PM DarkMatter, start a new thread, or post in this one. As I am having difficulty figuring out how to use the hotkey editor, I reasoned that other people probably have as well, so having the question/answer posted in public view would be more beneficial overall. If someone else knows how it works I might also recieve a response before DM drops by, saving him the time of explaining. I know many people have different views on posting in old threads, but we do stress searching first (as noted in the sidebar) and replying to the relevant thread, to keep things organized. If I was in error in this I apologize.

    johnr20000: The hotkey editor is reached by opening DatGen, load SimCity1.dat (not sure about the specific file), click Plugins on the sidebar, and click Hotkey Editor.

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    Hey guys. First, I'm glad you revived the old thread, rather than starting a new one. In certain situations, thats the preferable solution. ;) As for the hotkey editor itself, after I wrote it, no one showed any interest in it, so I never fully debugged it. I think it has some quirks that need ironing out. If people are interested in it, I'll rewrite it for DatGen 0.7.0.
     
    To use it, load SimCity_1.dat from your SimCity 4 directory, go to the plugins sidebar, and click the hotkey editor button. The hotkeys are stored in some .ini files there. The way the hotkey editor works, is it will create a NEW .dat file with your modified key mappings, rather than updating the original SimCity_1.dat. Again, I don't know exactly how well this plugin works, since no one ever really used it, I never fully debugged it. Post any errors you find here, and I'll take them into account when I rewrite it for DatGen 0.7.0.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    When I load SimCity_1 and the Hotkey editor, and double-click one of the entries it displays the hotkey on the right, but nothing else happens. I've tried other things (Hey, what does THIS button do? *BOOM* 18.gif) It's probably just really out of date.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online: A long, long time ago... 
     

    Did anything ever happen of the hotkey editor? Is it available anywhere (or does it work?)?

    I'd LOVE to be able to switch a few keys around, as half the hotkey are ones I use constantly, but the other half go unused. Be great to be able to create a labeling hotkey or ones for road-top mass transit pieces or NAM puzzle pieces... After all, I use that stuff all the time, whereas how often do you really use the hotkey for, say, elevated rail stations?

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account

    Sign In to follow this  

    • Recently Browsing   0 members

      No registered users viewing this page.

    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections