- Joined
- Jul 22, 2015
- Messages
- 3,485
It looks like pure sex, almost pornographic vJASS coding. I'll try it soon and, of course, it will be added to the JNGP![]()
Excellent work man, four suggestions:
1 - Allow to search fonts
2 - Allow to change font line space
3 - Allow to export/import config (want to install my theme?, here)
1 - Allow to search fonts
I meant an input to search for installed fonts ^^.
Default font and style makes it impossible to differentiate between q and g in raw codes.
globals
private constant real INTERVAL = 0.0312500
private constant real RELOCATION_RATE = 0.01
private constant real GRAVITY = 9.8*INTERVAL
// Accuracy to calculate slope
private constant real SLOPE_DETECTION_RADIUS = 0.1
// Higher accuracy will result different trajectory
// Consumes more memory but guaranted to produce more realistic trajectory
private constant integer SLOPE_DETECTION_ACCURACY = 5
private constant real SLOPE_SPEED_INCREMENT_STRENGTH = 0.05
private constant real SLOPE_SPEED_REDUCTION_STRENGTH = 0.05
// Higher value makes slopes have higher to move speed
private constant real SLOPE_STRENGTH_FACTOR = 1.25
private constant real MAXIMUM_SLOPE_SPEED_BONUS_RATE = 1.5
private constant real MAX_WALKABLE_SLOPE = 85.0*bj_DEGTORAD
private constant real SLIP_MAXIMUM_SPEED = 522.0*INTERVAL
private constant real SLIP_TURN_RATE = 15.0*bj_DEGTORAD
private constant real ABSOLUTE_SPEED_LIMIT = 1044.0*INTERVAL
// Minimum slope to indicate take-off
private constant boolean IDLE_DEACCELERATION = false
private constant real MINIMUM_TAKE_OFF_TILTNESS = 45.0*bj_DEGTORAD
private constant real RANGE_UNIT_ATTACK_RANGE = 600.0
private constant real MELEE_UNIT_ATTACK_RANGE = 128.0
private constant real GENERAL_UNIT_BACKSWING_POINT = 0.800
private constant real GENERAL_UNIT_TURN_RATE = 5.0*bj_DEGTORAD
private constant real GENERAL_UNIT_ACCELERATION = 16.0*INTERVAL
private constant real GENERAL_UNIT_DEACCELERATION = 5.0*INTERVAL
private constant real GENERAL_UNIT_MASS = 2.0*INTERVAL
endglobals
Can you fix it?
globals
private constant real INTERVAL = 0.0312500
private constant real RELOCATION_RATE = 0.01
private constant real GRAVITY = 9.8*INTERVAL
// Accuracy to calculate slope
private constant real SLOPE_DETECTION_RADIUS = 0.1
// Higher accuracy will result different trajectory
// Consumes more memory but guaranted to produce more realistic trajectory
private constant integer SLOPE_DETECTION_ACCURACY = 5
private constant real SLOPE_SPEED_INCREMENT_STRENGTH = 0.05
private constant real SLOPE_SPEED_REDUCTION_STRENGTH = 0.05
// Higher value makes slopes have higher to move speed
private constant real SLOPE_STRENGTH_FACTOR = 1.25
private constant real MAXIMUM_SLOPE_SPEED_BONUS_RATE = 1.5
private constant real MAX_WALKABLE_SLOPE = 85.0*bj_DEGTORAD
private constant real SLIP_MAXIMUM_SPEED = 522.0*INTERVAL
private constant real SLIP_TURN_RATE = 15.0*bj_DEGTORAD
private constant real ABSOLUTE_SPEED_LIMIT = 1044.0*INTERVAL
// Minimum slope to indicate take-off
private constant boolean IDLE_DEACCELERATION = false
private constant real MINIMUM_TAKE_OFF_TILTNESS = 45.0*bj_DEGTORAD
private constant real RANGE_UNIT_ATTACK_RANGE = 600.0
private constant real MELEE_UNIT_ATTACK_RANGE = 128.0
private constant real GENERAL_UNIT_BACKSWING_POINT = 0.800
private constant real GENERAL_UNIT_TURN_RATE = 5.0*bj_DEGTORAD
private constant real GENERAL_UNIT_ACCELERATION = 16.0*INTERVAL
private constant real GENERAL_UNIT_DEACCELERATION = 5.0*INTERVAL
private constant real GENERAL_UNIT_MASS = 2.0*INTERVAL
endglobals
globals
private constant real INTERVAL = 0.0312500
private constant real RELOCATION_RATE = 0.01
private constant real GRAVITY = 9.8*INTERVAL
// Accuracy to calculate slope
private constant real SLOPE_DETECTION_RADIUS = 0.1
// Higher accuracy will result different trajectory
// Consumes more memory but guaranted to produce more realistic trajectory
private constant integer SLOPE_DETECTION_ACCURACY = 5
private constant real SLOPE_SPEED_INCREMENT_STRENGTH = 0.05
private constant real SLOPE_SPEED_REDUCTION_STRENGTH = 0.05
// Higher value makes slopes have higher to move speed
private constant real SLOPE_STRENGTH_FACTOR = 1.25
private constant real MAXIMUM_SLOPE_SPEED_BONUS_RATE = 1.5
private constant real MAX_WALKABLE_SLOPE = 85.0*bj_DEGTORAD
private constant real SLIP_MAXIMUM_SPEED = 522.0*INTERVAL
private constant real SLIP_TURN_RATE = 15.0*bj_DEGTORAD
private constant real ABSOLUTE_SPEED_LIMIT = 1044.0*INTERVAL
// Minimum slope to indicate take-off
private constant boolean IDLE_DEACCELERATION = false
private constant real MINIMUM_TAKE_OFF_TILTNESS = 45.0*bj_DEGTORAD
private constant real RANGE_UNIT_ATTACK_RANGE = 600.0
private constant real MELEE_UNIT_ATTACK_RANGE = 128.0
private constant real GENERAL_UNIT_BACKSWING_POINT = 0.800
private constant real GENERAL_UNIT_TURN_RATE = 5.0*bj_DEGTORAD
private constant real GENERAL_UNIT_ACCELERATION = 16.0*INTERVAL
private constant real GENERAL_UNIT_DEACCELERATION = 5.0*INTERVAL
private constant real GENERAL_UNIT_MASS = 2.0*INTERVAL
endglobals
Anyway, this is a lot of improvements of the older tesh, nicey job!
It will be cool tho if it can put user declared functions and variables inside the auto complete list.
Are you sure? I mean, for example:This problem persists in the old TESH and even without any TESH
/************************************************************************************
* *
* Special Creep Engine v3.2 *
* ***** *
* by: Dalvengyr *
* *
* This engine generates special behavior to creep units. Makes your RPG become *
* much more alive. Give some brains to those shrimp-head creeps. They can flee, *
* they have sight area (you can sneak behind them), they are able to help each *
* other, they become aggressive and not aggressive as well. And many more! *
* *
* External dependencies: *
* (required) *
* - Table *
* - UnitIndexer *
* - GetClosestWidget *
* - Any DDS *
* (optional) *
* - TimerUtils *
* *
* Implementation: *
* - Copy paste SCE folder into your map *
* - Give two player slots for passive and aggresive player, better just *
* leave'em as closed slot *
* - Configure the system *
* - Done. *
* *
* Credits: *
* - GDD by Weep *
* - GetClosestWidget by Bannar *
* - UnitIndexer by Nestharus *
* - TimerUtils by Vexorian *
* - Table by Bribe *
* *
* (You can read more info at READ ME trigger) *
* *
*************************************************************************************
* *
* CONFIGURATION */
/************************************************************************************
* *
* RPG Threat System v3.2c *
* ***** *
* by: Quilnez *
* *
* This system generates special behavior to creep units. Gives some brains to *
* those shrimp-head creeps. They can flee, they have artificial sight area *
* (you can sneak behind them), they are able to help each other, they become *
* aggressive or not aggressive as well. And many more! *
* *
* External dependencies: *
* (required) *
* - Table *
* - UnitIndexer *
* - GetClosestWidget *
* - Any DDS *
* (optional) *
* - TimerUtils *
* *
* Implementation: *
* - Copy paste RPG Threat System folder into your map *
* - Give two player slots for passive and aggresive player, better just *
* leave'em as empty player slot *
* - Configure the system & start defining your creep behavior *
* - Done. *
* *
* Credits: *
* - GDD by Weep *
* - GetClosestWidget by Bannar *
* - UnitIndexer by Nestharus *
* - TimerUtils by Vexorian *
* - Table by Bribe *
* *
* (You can read more info at READ ME trigger) *
* *
*************************************************************************************
* *
* CONFIGURATION */
You see the only parts that got wrongly indented are only the ones I modified with your tesh. So I think the older tesh doesn't have this problem.
Are you sure?
It seems the new TESH crashes the editor when you try to save it after opening the Trigger Editor.
As you can see with the second GIF, all I do is open the Trigger Editor and immediately close.
Windows 10 64 Bit / 1.27bWhich OS and which version of Wc3 are you using?
YesThis only happens when actually closing the whole WE, not when just saving, right?
Never gave it a try. I will try once i reinstall WC3 because patch 1.28 has some issues.Does this also happen if you close without saving (click "No" button)?
Yes it always happened, which is how I was able to record the GIFDoes this always happen (i.e. reproducable) or does it sometimes work?
Nope. All I did was open the Trigger Editor, close it, and then closed the WE.Did you open any sub-windows of the TESH before (like function list etc.)?
Yep you're right. That's my bad for reporting without testing the older tesh. In fact I just tested it a few moments ago : pThe bug has been confirmed on the forum side in the meantime, so I am pretty sure that it is not TESH related. If you have indications that it could be different, please share them.
Saving doesn't crash it. However, if you save, and then close the map after, it still crashes.This only happens when actually closing the whole WE, not when just saving, right?
Yes. It also happens when I click on the "No" buttonDoes this also happen if you close without saving (click "No" button)?
100% of the time. All I have to do is open the Trigger Editor, close it, and close the map.Does this always happen (i.e. reproducable) or does it sometimes work?
Yep you're right. That's my bad for reporting without testing the older tesh. In fact I just tested it a few moments ago : p
Back with an update, lfh.
Looks like the hex in styles.ini might be backwards.
eg. 0xD8AB70 == rgb(216,171,112)
but you're saving that rgb value as 0x70ABD8.
It 's not an issue unless someone tries to edit the styles.ini manually, in which case they need to put in the hex values backwards.
Also a minor nitpick re styles.ini, what's the reasoning for enforcing
```
blah.backcolor=0x...
blah.backcolor_index=1
```
only to hide it with `blah.transparent=1`.
Surely these could all just be unset by default, and then setting them would override the background colour?
Worldedit hangs on closing if tesh has been started up during that session, sending me through two forcequite cycles before it finally gives up and goes away. (wc3 tft 1.28, cannot confirm if this is new, or if it affects 1.27b as well).
Rest looks pretty sweet!
More feedback to come later.
Hehe, well i tried to translate my old config into your format, and felt it'd be quicker to just edit the styles.ini directly.Yes thats right. This is because COLORREF stores colors in BGR order.
Maybe I will change that to store RGB, however I don't really see a reason why someone would modify the styles.ini manually.
Actually there is a pretty massive amount of plausibility checks implemented in the option file parser to avoid that manual modifications of this file can lead to undesired effects/crashes. So, it is not neccessary to manually modify that file: every possible option can also be set from within the WE.
Sure, but couldn't these just be left unset? ie if `text.backcolor` doesn't exist in the styles.ini file, use editor_background.backcolor in its stead. If it is set, use it. Then there is no issue with unintentionally overriding settings, as when the user selects a different global backcolour, only the editor_background.backcolor value changes in styles.ini. Everything else simply defaults to this backcolour if nothing else is set. If they want a different backcolour for something, eg `selection.backcolor`, then when they set this, `selection.backcolor` is explicitly added to styles.ini.Its not hidden, the color is actually used. There are several things to consider here, I have put quite some time in thinking this through before implementing this. Let me explain:
Typically, when users change the backcolor of the whole editor (the background of the editor itself), it is expected that other styles also change their backcolor "automatically". I.e. that they behave as if transparent.
For example, if I want to use a dark backcolor style, I usually just want to change the editor backcolor to black. I don't want to set the backcolor of all other styles manually to black as well, because thats redundant and tedious work. Therefore changing the editor backcolor should change other styles backcolors as well.
However, what happens if for some styles, I actually want to have a different backcolor. Then I don't want that this information is lost/overwritten when changing the editor backcolor.
There are basically two approaches to resolve this issue:
- Change only the backcolor of styles automatically, that had the same backcolor as the editor backcolor before the change was requested.
- Use a seperate flag to let the user configure which style should be "transparent". This is what is done in TESH 2.0.
So, why was the second option chosen over the first? Because it gives the user more flexibility by avoiding undesirable effects: Imagine your editor backcolor is white, the backcolor of, say, native types is red. Now the user changes the editor backcolor to red. After that, the user changes the editor backcolor to green. If method 1.) was used, the algorithm would have no way to detect that native type backcolor should actually stay red, regardless of the editor backcolor.
With option 2.) this is easily possible. It gives better control of style handling to the user. Therefore, this option was chosen for TESH 2.0.
Why I write "transparent" in double quotes?
Because the backcolor of the styles are not really transparent. Behind the scenes, if set to transparent, they look up the editor backcolor and just use this one.
Hehe, well i tried to translate my old config into your format, and felt it'd be quicker to just edit the styles.ini directly.![]()
I got it all to work, cept my colours turned out inverted. XD Trust Microsoft to make things weird. I'd suggest fixing this, though it's not huge priority. It just causes unnecessary confusion.
In this vein, it would be sweet if there was a button in the WE TESH style editor section to reload from the styles.ini (i had to restart wc3 each time lol). Using the interface is a bit slow, esp since it doesn't let you feed in hex directly.
Sure, but couldn't these just be left unset? ie if `text.backcolor` doesn't exist in the styles.ini file, use editor_background.backcolor in its stead. If it is set, use it. Then there is no issue with unintentionally overriding settings, as when the user selects a different global backcolour, only the editor_background.backcolor value changes in styles.ini. Everything else simply defaults to this backcolour if nothing else is set. If they want a different backcolour for something, eg `selection.backcolor`, then when they set this, `selection.backcolor` is explicitly added to styles.ini.
The old tesh used `backcolour=default` for these cases, but even that was superfluous imo. Just not including it in the file is enough. Then you might not even need the "transparent" flag.
Did you change how your injection works in the new version? I just tried out the current version with the JNGP replacement and it crashes the editor on startup. This doesn't happen with the old TESH and your previous version.
I'm using my SharpCraft project which simply loads up your dll. I do have some of my own hooks into various functions like CreateWindowsEx and SetMenu. I also override the GWL_WNDPROC, but I do read out the old one and call it after my own logic.Yes, there are some differences... which JNGP replacement did you use? Which OS are you using and do you get any error messages?
Awesome, thanksWill be added in the next patch.
Sounds good!However, I will probably display the transparent flag differently in the file... maybe just like text.backcolor=transparent instead of specifying the color itself.
wat? JNGP2.0?since JNGP will be discontinued.
I'm using my SharpCraft project which simply loads up your dll. I do have some of my own hooks into various functions like CreateWindowsEx and SetMenu. I also override the GWL_WNDPROC, but I do read out the old one and call it after my own logic.
I'm on Windows 8.1, and there are no errors, just a crash.
It might make sense if we work together a bit and make a SharpCraft specific version of your plugin
since JNGP will be discontinued.
Since JNGP is still stuck on version 1.21, it's breaking more and more, like GUI features crashing the editor and the recent MPQ changes that broke it as well. We have better alternatives that are updated and work with the most recent patches, so it's not worth the hassle to try and keep JNGP working.Hm, did I miss something?
Looks like it's different. For me it never crashed when I save maps. Only happen when I open a trigger.You might be encountering the same issue I had, @Quilnez.
0.9.1 can't open files (options/style) if it is located in a folder with non ASCII characters:
I also noticed a strange issue with font rendering.
I changed my font to Consolas, and noticed that even though the font is monospaced the space size was not the same as the character size. Changing the font size to 11 for consolas it renders as a proper monospaced font but any other size renders wrong.
Trying with Courier New the font remains monospaced for any font size up to size 10. Any higher than that and the spacing is wrong.
Also what does "Filter legacy TESH scroll/fold info"? Does it remove those two line left by the old TESH, or does it use them to restore the last editor state?
I also had a crash the first time I used it. For me it happened when I opened another trigger, and hasn't happened since so I have no Idea how to reproduce it.I've had a few reports from @Spellbound and @Kithio who have been experiencing crashes when coding. Spellbound tried switching back to old TESH and haven't been having any problems since. Problem is, it's a periodic/unreliable crash so it'll be hard to debug.
maybe you have some infinite loop on your code if the highlighting hits a weird syntax situation. You can try limiting the number of draws to a finite number and display an error when it's reached.
Specifically, for me, the crash happens when selecting a trigger with vJASS in it. I doesn't happen all the time - sometimes selecting trigger A will crash the editor, but other times I can select it and modify it without any problems. It seems really random.
I managed to somewhat reliably reproduce the error in a test map and even made a video of it:
SharpCraft World Editor Extended Bundle
PS: I used the current WEX default installation. No manual update on TESH yet.
Out of curiosity, what was the cause?