power crystals' XML patcher and data exporter (now under old management)

User avatar
The W:AB Noob
Lieutenant General
Posts: 4575
Joined: Fri 12 Jul 2013 22:29
Location: United States, Central Time Zone
Contact:

Re: power crystals' XML patcher and data exporter (now under old management)

Postby The W:AB Noob » Tue 30 Aug 2016 04:06

Just wondering, has there been any progress on the index command? No pressure at all.

power crystals
Corporal
Posts: 44
Joined: Tue 8 Apr 2014 00:18
Contact:

Re: power crystals' XML patcher and data exporter (now under old management)

Postby power crystals » Tue 30 Aug 2016 04:42

Bollywood Baloney wrote:
power crystals wrote:What I'm getting from that is I should add dictionary file editing at some point too so you can change the name with this tool. Nice work though!

That's actually not really necessary. (otherwise I'd have asked for it already! :P ) The Wargame Mod Installer already has a dictionary editor that functions very similarly to the patcher, except that it does its work at mod installation on the user's end. It makes more sense to do it that way since you don't have to send people whole ZZ_Win files, you just change the entries you need. This way people can also use texture packs that rename stuff without fear of things overwriting each other.


Oh, I'd never seen that thing. I guess really I should then work with that guy to get him a version of the patcher he can call from the mod installer to make distributing mods work the same way? No reason why it shouldn't be possible (well except for that stupid table you posted earlier)

The W:AB Noob wrote:Just wondering, has there been any progress on the index command? No pressure at all.


I had asked you if my assumptions were correct and didn't hear back. That said that change wound up in 2.3 anyway as I didn't feel like undoing it but I forgot to explicitly call it out as included (whoops!), so go try it and see if it works the way you want now.

User avatar
Bollywood Baloney
Chief Warrant Officer
Posts: 516
Joined: Thu 7 May 2015 21:32
Contact:

Re: power crystals' XML patcher and data exporter (now under old management)

Postby Bollywood Baloney » Tue 30 Aug 2016 08:18

power crystals wrote:Oh, I'd never seen that thing. I guess really I should then work with that guy to get him a version of the patcher he can call from the mod installer to make distributing mods work the same way? No reason why it shouldn't be possible (well except for that stupid table you posted earlier)


It'd be possible, but only practical for very small mods. Building NDF_Wins from patches just takes too long otherwise. For example, that Su-17 patch takes a good five minutes to run on its own.

If you're interested in another feature to add though (besides those nasty tables), how about the ability to copy all the properties of one instance into another (presumably new one)? There isn't even any need to support funky things like maps or lists of lists; as long as it can handle the occasional object reference, a copy function would be helpful for duplicating things like TAmmunition entries that have lots of simple properties that would be a pain in the ass to write out. You can already do this via the mod suite, but this would be something very helpful to be able to automate, more useful than table-as-map-key even. It also seems like a logical way to extend the ndfcreate function.

ShanRevan
Second-Lieutenant
Posts: 813
Joined: Mon 10 Feb 2014 04:46
Contact:

Re: power crystals' XML patcher and data exporter (now under old management)

Postby ShanRevan » Wed 31 Aug 2016 09:33

Conditional/comparitive filters (ie values >x) could be neat, as could standard operation effects (ie multiply value by x). To be honest it's mostly superfluous but there were a few times I had thought such effects might come in handy.

Being able to copy references would be pretty amazing though.

User avatar
The W:AB Noob
Lieutenant General
Posts: 4575
Joined: Fri 12 Jul 2013 22:29
Location: United States, Central Time Zone
Contact:

Re: power crystals' XML patcher and data exporter (now under old management)

Postby The W:AB Noob » Wed 31 Aug 2016 15:43

power crystals wrote:
The W:AB Noob wrote:Just wondering, has there been any progress on the index command? No pressure at all.


I had asked you if my assumptions were correct and didn't hear back. That said that change wound up in 2.3 anyway as I didn't feel like undoing it but I forgot to explicitly call it out as included (whoops!), so go try it and see if it works the way you want now.
Sorry, I didn't notice the change :oops:
I'll check it out soon.

ShanRevan wrote:Conditional/comparitive filters (ie values >x) could be neat, as could standard operation effects (ie multiply value by x). To be honest it's mostly superfluous but there were a few times I had thought such effects might come in handy.

Being able to copy references would be pretty amazing though.
I barely have knowledge of complex xml script, but can't it already be done using the referencedby commands?

power crystals
Corporal
Posts: 44
Joined: Tue 8 Apr 2014 00:18
Contact:

Re: power crystals' XML patcher and data exporter (now under old management)

Postby power crystals » Wed 31 Aug 2016 23:41

Bollywood Baloney wrote:It'd be possible, but only practical for very small mods. Building NDF_Wins from patches just takes too long otherwise. For example, that Su-17 patch takes a good five minutes to run on its own.


Fair enough. Most of this is just that the moddingSuite binary is very inefficient internally. I might be able to cache some things to speed it up (nested referencedbys/references are really bad because of how it does instance lookups) but ultimately I'm not sure how much I can do.

Bollywood Baloney wrote:If you're interested in another feature to add though (besides those nasty tables), how about the ability to copy all the properties of one instance into another (presumably new one)? There isn't even any need to support funky things like maps or lists of lists; as long as it can handle the occasional object reference, a copy function would be helpful for duplicating things like TAmmunition entries that have lots of simple properties that would be a pain in the ass to write out. You can already do this via the mod suite, but this would be something very helpful to be able to automate, more useful than table-as-map-key even. It also seems like a logical way to extend the ndfcreate function.


This should be entirely possible and I can absolutely see the use for it. I'll have to figure out where I left the code that can properly do infinite depth traversal of those collections since I don't think the current patcher has that bit.

ShanRevan wrote:Conditional/comparitive filters (ie values >x) could be neat, as could standard operation effects (ie multiply value by x). To be honest it's mostly superfluous but there were a few times I had thought such effects might come in handy.


Comparative filters might be a pain but mathematical operations is something I keep forgetting to add. Would you believe the original reason I wrote this thing 2 years ago was because I wanted to make a mod that was just "x2 fuel to all ground units"? :)

User avatar
Bollywood Baloney
Chief Warrant Officer
Posts: 516
Joined: Thu 7 May 2015 21:32
Contact:

Re: power crystals' XML patcher and data exporter (now under old management)

Postby Bollywood Baloney » Thu 1 Sep 2016 04:32

power crystals wrote:Fair enough. Most of this is just that the moddingSuite binary is very inefficient internally. I might be able to cache some things to speed it up (nested referencedbys/references are really bad because of how it does instance lookups) but ultimately I'm not sure how much I can do.

I wouldn't worry about that. I've always seen wgpatcher as a developer tool where things like speed don't really matter. It's already orders of magnitude faster than the alternative, doing it by hand.

Edit: okay, here's an actual problem I seem to have run into. Is there any way to set a List type property to null? "Clear" only deletes the contents of the list (leaving the list itself, a Collection [0] in the mod suite), and nulling it or setting it to unset demands a key, which I can't provide since the list is empty.

power crystals
Corporal
Posts: 44
Joined: Tue 8 Apr 2014 00:18
Contact:

Re: power crystals' XML patcher and data exporter (now under old management)

Postby power crystals » Fri 2 Sep 2016 01:03

Bollywood Baloney wrote:Edit: okay, here's an actual problem I seem to have run into. Is there any way to set a List type property to null? "Clear" only deletes the contents of the list (leaving the list itself, a Collection [0] in the mod suite), and nulling it or setting it to unset demands a key, which I can't provide since the list is empty.


Hah, nice catch. The amazing part is I actually set up the "null" operator with a code path for no key provided and then flagged it as requires a key anyway so there was no way to ever trigger that. Good job, me. I tested that operator specifically, but using a set with type Unset should also work.

2.3.2 at http://www.wargamerandomdeck.com/tools/ as usual. Now with 100% less "nothing actually works because I'm an idiot". I really need to set up some kind of automated tests for this thing.

User avatar
The W:AB Noob
Lieutenant General
Posts: 4575
Joined: Fri 12 Jul 2013 22:29
Location: United States, Central Time Zone
Contact:

Re: power crystals' XML patcher and data exporter (now under old management)

Postby The W:AB Noob » Fri 2 Sep 2016 03:24

Thanks for all the work you're doing.

Unfortunately, I tried using the index command on patch 2.3.2 but got this:
Image

power crystals
Corporal
Posts: 44
Joined: Tue 8 Apr 2014 00:18
Contact:

Re: power crystals' XML patcher and data exporter (now under old management)

Postby power crystals » Fri 2 Sep 2016 05:07

You need quotes around your path because it contains a space; e.g.

Code: Select all

wgpatcher index "D:\Games\Steam\Steamapps\common\Wargame Red Dragon\Data\WARGAME\PC"

Without the quotes it will end the path at "\Wargame" which doesn't exist. That's just how Windows (and everything else, really) works.

Return to “Modding”

Who is online

Users browsing this forum: Bing [Bot], qatarcancelpolicy and 18 guests