Page 4 of 5

Re: Presenting UruDistro

PostPosted: Mon Dec 06, 2010 9:04 pm
by Wamduskasapa
Chacal, you know me and you know some of the things I have done in the past. SO you can imagine the uses that I will put this wonderous tool to.

On bended knee I DO thank you...

Re: Presenting UruDistro

PostPosted: Tue Dec 07, 2010 2:55 am
by diafero
Great news, keep it going!

Re: Presenting UruDistro

PostPosted: Thu Mar 03, 2011 8:31 am
by Egon
Image
So, Chacal, what's up with UruDistro? Where are You at?

On related note:
For age prefixes we now use this wiki page.
But we don't have anything similar for managing page numbers, which might be a problem in context of custom pages for existing Cyan Ages.

For example: Dustin have something for his plugin for custom relto pages.

Did You have something in mind? Like build in UruDistro page register, or adlest something which would worn about two prp files being in conflict.

I guest that simplest solution would be to just use another wiki page for this.

Re: Presenting UruDistro

PostPosted: Fri Mar 04, 2011 7:41 am
by Chacal
To be honest, there are so few Age add-ons made by even fewer people, that the thought has never crossed my mind.

As for uruDistro, since I just delivered ISO/IEC 27034 part 2 yesterday, I can now start thinking about it again.

Re: Presenting UruDistro

PostPosted: Thu Nov 24, 2011 10:49 am
by Chacal
Hi folks,
I have two days of medical leave, having just undergone surgery.
So me, my bruised body and my several bottles of pills are now having a little fun with UruDistro again.
Specifically I am packaging Sirius's files for the Gahreesen wall. I thought this would be a good test.

Sirius's project is probably typical, in that it results in a bunch of object files that need to be imported into prps.
Sirius has already distributed an archive in which, for each prp, there is a folder with a bunch of .uof files.
For importing those object files, UruDistro uses libHPlasma's prpmod.exe, which needs the object name and type.
Extracting this information means decompiling each object file using prcdc.exe, and getting the information from its plKey node.

That would be a lenghty process if we did that manually (one of Sirius's folders has 1743 object files!) so I have written a packager, a script for generating the xml information needed by the UruDistro install script. The mod author runs this script, selects a folder and the script generates a text file. It took less than 2 minutes to process 1743 files while also creating a verbose log.

So the script, ran against Sirius's "Garrison_District_grsnTeamRoom01" folder, which contains 3 files (01-2.uof, TeamRoom01.uof and tr1lo.uof), generates this text fragment:

Code: Select all
   <!-- Changes to a prp file -->
   <prp id="Garrison_District_grsnTeamRoom01" scenenode="Garrison_District_grsnTeamRoom01">
      <addobj id="suitShooterPOS" type="plSceneObject" data="01-2.uof"/>
      <addobj id="cRespTeam1TubeDown" type="plResponderModifier" data="TeamRoom01.uof"/>
      <addobj id="team1TubeActivator_0_Enter" type="plLogicModifier" data="tr1lo.uof"/>
   </prp>


The mod author can now paste this fragment into the xml install file.
The script assumes that the folder name is the prp file name, and also the name of the plSceneNode in the prp. If not, this can be edited manually.

Using this tool, a mod author can package his mod in a few minutes.

Another approach has been suggested, in which a mod author would run a kind of diff script which would compare an Uru installation (with only the mod applied) with a virgin Uru installation. This should be quite easy for me to do I think, but would require discipline from the mod author: he/she would have to set aside a snapshot of his Uru installation before any change, and have a separate installation with only the changes from his mod. That is on top of the author's regular Uru installation. I don't know if it is reasonable to expect that much from the author.

However, just writing about it gives me the urge to try it, so I'll probably end up doing both tools anyway and let the authors choose their approach.

Thoughts, suggestions, etc.?

Re: Presenting UruDistro

PostPosted: Fri Nov 25, 2011 6:03 am
by tachzusamm
Chacal wrote:he/she would have to set aside a snapshot of his Uru installation before any change, and have a separate installation with only the changes from his mod. That is on top of the author's regular Uru installation. I don't know if it is reasonable to expect that much from the author.


If I understand this correctly, your UruDisco... umm Distro works like a diff/patch in binary form for URU files, yes?

So, instead of having the need of two *complete* URU installations, would it be possible to tell your scripts in any way which files are to be taken into account for comparison, for example with a simple text file that contains the names of the modified files, one in each line for example? Or maybe XML as well, if you prefer.

(Actually, I assume such a file is not even needed if the rule goes like this: "Author or the mod, please provide an URU installation structure containing *only your modded files*, for comparison withthe original files, using the same structure." This way you could handle only the files you find in the modified branch.)
The opposite way could also be an idea of course; I mean, keeping a duplicated structure of the non-modified files.

Re: Presenting UruDistro

PostPosted: Fri Nov 25, 2011 6:32 am
by Sirius
This looks great. I guess UruDistro will be able to remove objects from a PRP too ?
It should be useful for some other of my projects.

Both approaches looks good to me. In my opinion, the second one would be better the way Tachzusamm described it.

I wish you a quick recovery.

Re: Presenting UruDistro

PostPosted: Fri Nov 25, 2011 7:11 am
by Wamduskasapa
I Third That (what Sirius and tachzusamm said)

@ Chacal - Some of the first things I am MOVING are the Tarps and Barricades in the Library, since you have already extended it 3 levels. Then to the Palace and Dock to remove the Gates and Barricades that you previously made Superfluous...

Re: Presenting UruDistro

PostPosted: Fri Nov 25, 2011 12:53 pm
by Chacal
tachzusamm wrote:If I understand this correctly, your UruDisco... umm Distro works like a diff/patch in binary form for URU files, yes?

The packager would work like a diff but not in binary form. For that I would need to write a real program in C language, using the libHplasma library. For now I'm only making scripts (using VBscript) that call the libHPlasma executable tools. In order to find the differences between two prp files, I would have to decompile them into prcs and work with the XML format.

tachzusamm wrote:So, instead of having the need of two *complete* URU installations, would it be possible to tell your scripts in any way which files are to be taken into account for comparison, for example with a simple text file that contains the names of the modified files, one in each line for example? Or maybe XML as well, if you prefer.

(Actually, I assume such a file is not even needed if the rule goes like this: "Author or the mod, please provide an URU installation structure containing *only your modded files*, for comparison withthe original files, using the same structure." This way you could handle only the files you find in the modified branch.)
The opposite way could also be an idea of course; I mean, keeping a duplicated structure of the non-modified files.


Quite so. Knowing which files have been modified would greatly speed up work. You still need the original files for comparison though. But if the modder has enough discipline to do that, then he should use the first method instead. The second method is more of an afterthought: "Hey I made this great mod but I can't remember what I changed."

Sirius wrote:This looks great. I guess UruDistro will be able to remove objects from a PRP too ?
It should be useful for some other of my projects.


Of course. That works very well, I'm using prpmod.exe from the libHplasma tools. Even better, I have found the way to remove visible objects from the plDrawableSpans.

Wamduskasapa wrote:Some of the first things I am MOVING are the Tarps and Barricades in the Library, since you have already extended it 3 levels. Then to the Palace and Dock to remove the Gates and Barricades that you previously made Superfluous...


It goes without saying that, after Sirius's wall, the next distro will contain my changes to the City, made better by the removal of visible objects.

As for moving objects, I have never done that but it shouldn't be too complicated. It means changing the object's icicles in plDrawableSpans and, if the object has collision, its plGenericPhysical. The author needs to do the changes in Blender and export those two new objects.

Doing changes to the plDrawableSpans is complex and brings the risk of affecting other modifications, It has to be carefully considered.

Re: Presenting UruDistro

PostPosted: Sat Nov 26, 2011 4:04 am
by Sirius
Chacal wrote:As for moving objects, I have never done that but it shouldn't be too complicated. It means changing the object's icicles in plDrawableSpans and, if the object has collision, its plGenericPhysical. The author needs to do the changes in Blender and export those two new objects.
About moving objects: IIRC you don't need any modification for objects that have a Coordinate Interface, as both their physics and drawable are calculated from the objects origin/rotation. Physics might be a bit more complicated as they can use or not the coordinate interface (I had some issues with these lately).

Chacal wrote:The author needs to do the changes in Blender and export those two new objects.
Wouldn't it be easier to change the objects rotation and position directly in the PRP ? Blender would be used only to make sure the location you want to apply to the object is correct.