Project Perfect Mod Forums
:: Home :: Get Hosted :: PPM FAQ :: Forum FAQ :: Privacy Policy :: Search :: Memberlist :: Usergroups :: Register :: Profile :: Log in to check your private messages :: Log in ::


The time now is Tue Mar 19, 2024 7:45 am
All times are UTC + 0
Small program for making SP maps easier to create
Moderators: Global Moderators, Red Alert 2 Moderators
Post new topic   Reply to topic Page 1 of 1 [10 Posts] Mark the topic unread ::  View previous topic :: View next topic
Author Message
Agent Z
AA Infantry


Joined: 05 Sep 2013
Location: LocationNotFoundException at RealLife.Location.find() at line: -1

PostPosted: Wed Mar 28, 2018 1:40 am    Post subject:  Small program for making SP maps easier to create
Subject description: For the specific task of copying scripts & teams.
Reply with quote  Mark this post and the followings unread

Today when making another campaign map, I ended up once again making lots of copies of a script which was Garrison waypoint X. After a while I realized this can be automated and decided never again. I instead went for making a small program in Java to speed things up a bit (and practice my JavaFX), and figured I'd post it here in case anyone else wants to use it (I was uncertain about where exactly this belongs, so posted it with the mapping stuff). It just creates sections by incrementing the IDs and other values. Now like the title says this is a small program, so it doesn't do much else.

It adds the new sections just after the list type entered in the input to the right, as that was the simplest (and FinalAlert will just move them around anyway).

The program reads brackets to find which values you want to increment, the syntax is described in the program window.



Copy Machine.zip
 Description:
Version 2.0
Remember to save a copy of the map just in case.

Download
 Filename:  Copy Machine.zip
 Filesize:  44.17 KB
 Downloaded:  9 Time(s)


Last edited by Agent Z on Sun Apr 01, 2018 7:17 pm; edited 6 times in total

Back to top
View user's profile Send private message
McPwny
Cyborg Artillery


Joined: 29 Jan 2018

PostPosted: Wed Mar 28, 2018 2:28 am    Post subject: Reply with quote  Mark this post and the followings unread

how do i use it?

Back to top
View user's profile Send private message
E1 Elite
General


Joined: 28 May 2013

PostPosted: Wed Mar 28, 2018 6:31 am    Post subject: Reply with quote  Mark this post and the followings unread

For very very limited and specific use. We could as well open map in a
text editor and copy paste.

Fields could be described better.
- Script Action number
- Script action's parameter as waypoint
- Script ID start
- Script ID end

Could put a readme.
- Install JRE/JDK latest (minimum Java 8 )
- Run as command line like
java -jar "Copy Machine.jar"

Area Guard in TS is 11,10.

Back to top
View user's profile Send private message
Agent Z
AA Infantry


Joined: 05 Sep 2013
Location: LocationNotFoundException at RealLife.Location.find() at line: -1

PostPosted: Wed Mar 28, 2018 11:01 am    Post subject: Reply with quote  Mark this post and the followings unread

E1 Elite wrote:
For very very limited and specific use. We could as well open map in a
text editor and copy paste.

That is the very task I wanted to automate. When I want to make scripts to garrison 30 structures in the map, it gets a bit boring to copy paste the script and increment the numbers manually.
E1 Elite wrote:

Fields could be described better.
- Script Action number
- Script action's parameter as waypoint
- Script ID start
- Script ID end

Thank you, these are much better. I just couldn't think of any good descriptions.
E1 Elite wrote:

Could put a readme.
- Install JRE/JDK latest (minimum Java 8 )
- Run as command line like
java -jar "Copy Machine.jar"

Will do. Is it necessary to use command line though? I just double click it to run (on windows at least).
E1 Elite wrote:
Area Guard in TS is 11,10.

I can implement this as another checkbox so that it works for TS too.

McPwny wrote:
how do i use it?

If you have java installed, should be just to double click it.

Back to top
View user's profile Send private message
McPwny
Cyborg Artillery


Joined: 29 Jan 2018

PostPosted: Wed Mar 28, 2018 4:11 pm    Post subject: Reply with quote  Mark this post and the followings unread

it works. it basically gives you a convenient button that spams short simple scripts that can be a tedium to make. what would it take to use this to make and spam implement entire AI scripts i wonder?



eetwurks.jpg
 Description:
 Filesize:  108.52 KB
 Viewed:  2269 Time(s)

eetwurks.jpg



Back to top
View user's profile Send private message
Agent Z
AA Infantry


Joined: 05 Sep 2013
Location: LocationNotFoundException at RealLife.Location.find() at line: -1

PostPosted: Wed Mar 28, 2018 9:38 pm    Post subject: Reply with quote  Mark this post and the followings unread

Added version 1.02.
Seems I had a lot of time for these things. The changes are:

  • Do pretty much the same as before but with team types as well.
  • Replaced the old Java file chooser with the JavaFX one.
  • Structure improvements so that different types of sections are easier to use.

I think I will leave it like this for a while, until I get annoyed by some other repetitive task.

Back to top
View user's profile Send private message
McPwny
Cyborg Artillery


Joined: 29 Jan 2018

PostPosted: Wed Mar 28, 2018 10:52 pm    Post subject: Reply with quote  Mark this post and the followings unread

very nice improvement. i noticed though that script and taskforce ID gets a digit cut off, which is not good. you have a cargo plane toggle so perhaps you should also add the transport waypoint. the program doesent allow for it but AI teams require the waypoint and house entry to be blank on a team, though they also need other tags like Priority, Max, Aggressive, Prebuild, IsBaseDefense, and OnTransOnly, anyways.
it would gain a lot of function if it allowed for multi lined scripts and multiple script actions. and a dropdown box for things like the teams house value would be luxurious.

very cool program.



Image52.jpg
 Description:
 Filesize:  151.59 KB
 Viewed:  2218 Time(s)

Image52.jpg



Back to top
View user's profile Send private message
Agent Z
AA Infantry


Joined: 05 Sep 2013
Location: LocationNotFoundException at RealLife.Location.find() at line: -1

PostPosted: Thu Mar 29, 2018 12:32 am    Post subject: Reply with quote  Mark this post and the followings unread

I quickly fixed the thing with the missing 0-digits. Before I just assumed the amount of zeroes at the beginning will be the same for the team ID and the IDs of scripts and task forces, but I guess that isn't obvious if it isn't FA2 that made them. Now it counts them all separately.

Back to top
View user's profile Send private message
Holland
Grenadier


Joined: 31 May 2017

PostPosted: Fri Mar 30, 2018 3:03 am    Post subject: Reply with quote  Mark this post and the followings unread


Back to top
View user's profile Send private message
Agent Z
AA Infantry


Joined: 05 Sep 2013
Location: LocationNotFoundException at RealLife.Location.find() at line: -1

PostPosted: Sun Apr 01, 2018 7:33 pm    Post subject: Reply with quote  Mark this post and the followings unread

I had too much fun working with this, and since I got a idea for a less specific implementation, I made version 2.0. It can do more than the previous versions, but is a bit more complicated. Entering the wrong input is easier now, since the program goes for a more general approach to the whole copying thing. I didn't test it very much, but it seems to do what it is supposed to.
Changes:

  • You can now pretty much enter what you want, and choose freely which values to increment for the sections.
  • Sections can now be of any type, if left empty it will just put the result below [Header]. Haven't tested AI triggers though, or anything that isn't really a section like TeamTypes or ScriptTypes.
  • There is no longer a "end" input, but it is replaced by "amount". This might be more intuitive in some cases.

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [10 Posts] Mark the topic unread ::  View previous topic :: View next topic
 
Share on TwitterShare on FacebookShare on Google+Share on DiggShare on RedditShare on PInterestShare on Del.icio.usShare on Stumble Upon
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © phpBB Group

[ Time: 0.1591s ][ Queries: 15 (0.0108s) ][ Debug on ]