PCM.daily banner
25-11-2024 15:44
PCM.daily
Users Online
· Guests Online: 96

· Members Online: 1
Ollfardh

· Total Members: 161,812
· Newest Member: cvhyp12
View Thread
PCM.daily » Pro Cycling Manager 2006-2020 » Pro Cycling Manager 2012
 Print Thread
The Slope Corrector
lluuiiggii
Ever thought about how easy it was to have good or constant slopes in the PCM09-earlier stage editor, and about how much work it is to have the same effect in the PCM10~12 editor? I'm not sure how it is for the other people, but at least for me correcting slopes on the big mountains in the PCM12 SE is time-consuming and not much easy, specially if you're looking to get those perfect-looking slopes.

Well these 'worries' could be over with these 30-kb excel files! Basically, they do the math and give you the road point heights you'd need to have for the most constant slopes possible - or any way you'd like to set your climb or follow the real profile (such as having a flattish section in the middle, or really steep sections.. you define the slope % and the distance of it).

Perhaps it might even help creating fantasy stages, or stages without .dem files. Although in that case a file having a file for more than 40 road points would be good (40 is the biggest nº of points which have a file for now), so it's something to keep in mind Smile

What I'd really like to have is an automatic process of road point heights replacing, in the roads .xml file. Then you load the road network in the SE and it's all done - unfortunately, I have negative 15% knowledge of how to even start doing something like that, so not for now Pfft

Keep in mind that this is a "beta" version - while I think there'll hardly be a bug, because it's such a 'simple' thing (compared to an actual software), the spreadsheets have basically 'no' design, it's basically a lot of numbers, most of which you can/should ignore, and not much 'user-friendly'. It does work though, and has turned out to be really useful for me in some situations.

Anyway, there's one file for each number of road points in a climb, from 5 to 40. Concerning how to use them, read the post below. As for the download, the files are attached. Make sure that you enable macros to run. And as for the installation, just extract the .rar Wink
lluuiiggii attached the following file:
slope-corrector.rar [824.56kB / 348 Downloads]

Edited by lluuiiggii on 16-09-2012 02:38
 
lluuiiggii
Video Tutorial (see instructions below as well)



Instructions

1. Individually select into the route each road point of the climb (also count how many they are).

i1110.photobucket.com/albums/h449/lluuiiggii/1-3.jpg

2. When that’s done, export the water/road network .xml file.

i1110.photobucket.com/albums/h449/lluuiiggii/2-1.jpg

3. Open the .xml file with the notepad, and look for the “<Route>” tags. They’re the last in the file unless you have water in the .zcts, so if not you can just scroll down all the way to the finish. If you have water on it use the search function. Copy everything from “<Route>” to “</Route>”.

i1110.photobucket.com/albums/h449/lluuiiggii/5-1.jpg

4. Open the excel file corresponding the number of road points you have in the climb. Paste the info on the first cell (A1), and click the “Substitutions” button.

5. Back to the stage editor, go in the profile view, right menu, 2nd tab. In the “blue mark” box, fill a value some kms bigger than the route (you might need to do this a couple of times). Then the editor will give you a more precise distance of the climb. Fill this value in the excel file, under the “Insert real climb length” box.

i1110.photobucket.com/albums/h449/lluuiiggii/3.jpg

6. Now copy the value that will appear on cell C1 to cell D1 – but you need to paste only the value, so you can do it by Excel (e.g. ‘paste special’ -> values) or paste it in notepad, and copy from notepad to D1, or type it manually, whatever that gets the value to D1 Pfft

i1110.photobucket.com/albums/h449/lluuiiggii/4-1.jpg

7. That’s about it, now load the .zcts that has the full route again and change the road point height values according to the column “New Z” from the excel file.

Explanation of the table columns:

Point: road point number
Distance: distance from the current point to the previous one
Accumulated distance: total distance of the climb up to that point (this is for the person’s reference for the next column)
%: The average % of the slope from the current point to the previous one. By default, all cells will be filled with the climb average % (so you’d have a totally constant climb), but if you want to change it in some point of the climb, change this value (you can then use the previous column as a reference).
Z: the current height of your road point
Correct Z: the correct Z, according to the % you’ve filled in the % column
New Z: same thing as the previous column, but with only one number after the comma so it’s easier to see Pfft

In other words, you can ignore everything other than the substitutions button, cells C1 and D1, columns Accum Dist, % and New Z and the “insert climb length here” cell.

Some last notes:
- you'll probably need to adjust the terrain around the road points after 'using' this, because they often change a lot and look unrealistic, unless it's a 'naturally' straight-forward and constant climb.
- in some cases for some reason the substitutions might not occur 100% correct, and one or another height points might count as, for example, "225.329" (as in 225 thousand) instead of "225,329". If that's the case, just add a comma in the number.

Well I guess that's it, I probably forgot to say something so this might be edited over the time, but other than that I guess that's it Pfft Suggestions are welcome, please ask if you have a question, and hopefully this can be useful for the stage makers of the community who spend part of their free time in helping making the game better. Thanks for the attention Wink
Edited by lluuiiggii on 23-10-2012 23:11
 
Lachi
Sounds great.

About your automatic idea: You can open xml files in Excel. But I don't know how that specific data would look like.
 
SportingNonsense
Looks like it could be really useful.

Does the 40 road point limit apply to the whole stage file, or just to any of the road points that have been selected as the actual route - with the flags?
farm8.staticflickr.com/7458/9357923136_f1e68270f3_n.jpg
 
lluuiiggii
Lachi wrote:
Sounds great.

About your automatic idea: You can open xml files in Excel. But I don't know how that specific data would look like.

Well, from what I have seen, the road building in the xml files work as:
Road point 1 info*
Tangent 1 of road point 1 info
Road point 1 [info]
Tangent 2 of road point 1
Road point 2
Tangent 1 of road point 2

* such as:
<Point>
<X>9889.75</X>
<Y>7496.93</Y>
<Z>44.8734</Z>
<Width>3</Width>
</Point>

.. and so on. So basically what would need to be done is locate each road point by matching X and Y numbers, and then change the Z for each of them.

Honestly I wouldn't know how to do that automatically, but looking at the .xml in excel, I believe that it would be possible to do it by copying and pasting numbers which would be easier than the current way of doing it. But then when saving it says that "the XML maps of this workbook are not exportable", any workaround on this?

SportingNonsense wrote:
Looks like it could be really useful.

Does the 40 road point limit apply to the whole stage file, or just to any of the road points that have been selected as the actual route - with the flags?

They apply to the road points selected in the route.
 
Lachi
I am a total noob concerning the stage editor but I could have a look at it if you upload such a XML file.
 
lluuiiggii
Lachi wrote:
I am a total noob concerning the stage editor but I could have a look at it if you upload such a XML file.

Here's a small one (in terms of roads, etc) which I used for testing.
Edited by lluuiiggii on 16-09-2012 00:27
 
bigggassi
Awesome! What a brilliant idea!

One Question:

If I have already a done stage and also several mountains in it. Can I use your tools to improve the slopes or its just working with a new stage?
Edited by bigggassi on 16-09-2012 01:19
 
lluuiiggii
bigggassi wrote:
Awesome! What a brilliant idea!

One Question:

If I have already a done stage and also several mountains in it. Can I use your tools to improve the slopes or its just working with a new stage?

Certainly you can Wink Just need to remove the route, select each road point of the climb in the new route and later load the stage with the full route (to change the points' height). Oh and thanks Smile
 
Ad Bot
Posted on 25-11-2024 15:44
Bot Agent

Posts: Countless
Joined: 23.11.09

IP: None  
bigggassi
Ok, I'll give it a test. Thanks.
 
jseadog1
Very well done!

pcmdaily.com/images/mg/Awards2022/userproject.png
pcmdaily.com/files/Awards2016/fantasy.png

PCM.Daily Survivor Season 2 Fan Favorite Winner

PCM.Daily NFL Fantasy Football Champion: 2012
PCM.Daily NHL Prediction Game Champion: 2013
PCM.Daily NFL Prediction Game Champion: 2012, 2013, 2015, 2016, 2021
 
Pierre-Rolland
Very nice, I'll try to translate it in french, but it's a little bit hard to understand all actions.
Pierre-Rolland ==> Mista-Flo

sd-5.archive-host.com/membres/images/c0d9dfa4e1319c8069e1aa1099e12cb958ea1c18/wordpress.png sd-5.archive-host.com/membres/images/c0d9dfa4e1319c8069e1aa1099e12cb958ea1c18/twitter.png
sd-5.archive-host.com/membres/images/c0d9dfa4e1319c8069e1aa1099e12cb958ea1c18/facebook.png sd-5.archive-host.com/membres/images/c0d9dfa4e1319c8069e1aa1099e12cb958ea1c18/youtube2.png
sd-5.archive-host.com/membres/images/c0d9dfa4e1319c8069e1aa1099e12cb958ea1c18/pcmf.png
 
http://pcmfrance.com/
Lachi
lluuiiggii wrote:
Lachi wrote:
I am a total noob concerning the stage editor but I could have a look at it if you upload such a XML file.

Here's a small one (in terms of roads, etc) which I used for testing.

I cannot see a file. You have to zip it if that was the problem.
 
lluuiiggii
Pierre-Rolland wrote:
Very nice, I'll try to translate it in french, but it's a little bit hard to understand all actions.

Thanks Smile In that case I'll hold it a bit more before posting in Cyanide forum, posting in French there would be easier I guess. And if you have any doubt, just ask Wink

Lachi wrote:
lluuiiggii wrote:
Lachi wrote:
I am a total noob concerning the stage editor but I could have a look at it if you upload such a XML file.

Here's a small one (in terms of roads, etc) which I used for testing.

I cannot see a file. You have to zip it if that was the problem.

Oh, of course, forgot that we can't attach .xml files directly Pfft
lluuiiggii attached the following file:
test2.rar [2.22kB / 304 Downloads]

Edited by lluuiiggii on 16-09-2012 16:08
 
Lachi
Regarding the automatic process:
As far as I understand, only a part of the stage (one slope) will be exported.
But it is even possible to import one slope only?
 
lluuiiggii
Lachi wrote:
Regarding the automatic process:
As far as I understand, only a part of the stage (one slope) will be exported.
But it is even possible to import one slope only?

Actually it is (isolating the slope on the .xml file and then importing it into the stage), but that isn't the effect I'm looking for. What I'm looking for is: the person begins building the stage and builds only the roads, then start correcting the profiles. If he exports the roads, edit the road point heights and start a new stage with that (with the edited .xml), it'd be the same thing as before, only with edited road point heights. So it wouldn't be useful for already-finished stages (or near finished, where there's cities, fields, forests, etc), because only the roads/water are saved in the .xml, and thus these stages would need to be edited through the current method (editing by hand point by point).

So, summing up, the whole connection of roads would be exported, some road points are edited, and then the whole connection of roads would be imported in a new stage in the editor.
 
Lachi
Sorry but I did not understand much.
When you say "..then starts correcting the profiles.." you mean using your excel and then manually putting the values back into the stage editor?

Or do you mean that somebody would export the whole stage (so without selecting "each road point of the climb"Wink?
And then how would he fix the profiles?
 
mb2612
This is really cool, unfortunately I have excel only at work, otherwise I would love to help you develop it further. Auto importing and exporting the xml should be fairly straightforward, as should combining everything into 1 sheet, rather than needing 40 sheets.
i439.photobucket.com/albums/qq112/Gustavovskiy/microjerseys/PT/std_zpsb6c2f350.png[url=www.pcmdaily.com/forum/viewthread.php?thread_id=33182]Team Santander Media Thread[/url]i439.photobucket.com/albums/qq112/Gustavovskiy/microjerseys/PT/std_zpsb6c2f350.png

Please assume I am joking unless otherwise stated
 
lluuiiggii
Lachi wrote:
When you say "..then starts correcting the profiles.." you mean using your excel and then manually putting the values back into the stage editor?

Well, at least for me, there are two parts of 'correcting profiles': one is making the roads generally smooth (in flattish-like sections, and such), which I do it in the stage editor. Then when I reach a bigger climb, I use the excel (can be done more than once if there's more than one climb on the stage).

Lachi wrote:
Or do you mean that somebody would export the whole stage (so without selecting "each road point of the climb" )?
And then how would he fix the profiles?

In fact, both would be needed for an automatic process: one export only with the climb road points in the route (which would be used to calculate the correct point heights) and one with the whole stage route (where the old road point heights would be replaced by the new ones), which would be the file to be loaded in the SE after edited.

mb2612 wrote:
This is really cool, unfortunately I have excel only at work, otherwise I would love to help you develop it further. Auto importing and exporting the xml should be fairly straightforward, as should combining everything into 1 sheet, rather than needing 40 sheets.

Thanks Smile Pity that you only have excel at work Frown Do you think that importing the .xml and automatically changing values can be done without going outside excel? If yes, any direction to that? Smile Oh, and as for the 40 sheets, they are actually 36 (the count starts at 5) Pfft But how would you do that, by placing each (currently) sheet as a new plan in the same sheet? Wouldn't that slow down the file?

I'm pretty much an excel noob, only creating a macro to take out the "<x>", "<y>", etc tags was already a pain Pfft Oh and I'm still stuck with the saving the .xml after opening it in excel, if that was possible it'd already be faster than the current method, so if anyone has a workaround it'd be great Smile
 
bigggassi
I have a problem. Even it had worked for me the last time I used it, I don't get it this time done. After selecting the road-points in the notepad I want to paste them into the slope corrector but this is what happens:

i.tinyuploads.com/4w079w.png
Edited by bigggassi on 21-09-2012 04:57
 
Jump to Forum:
Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Latest content
Screenshots
Kirchen wins the Milan-Torino
Kirchen wins the Milan-Torino
PCM 07: General Screenshots
Fantasy Betting
Current bets:
No bets available.
Best gamblers:
bullet fighti... 18,376 PCM$
bullet df_Trek 17,374 PCM$
bullet Marcovdw 15,445 PCM$
bullet jseadog1 13,552 PCM$
bullet baseba... 10,439 PCM$

bullet Main Fantasy Betting page
bullet Rankings: Top 100
ManGame Betting
Current bets:
No bets available.
Best gamblers:
bullet Ollfardh 21,890 PCM$
bullet df_Trek 15,520 PCM$
bullet Marcovdw 14,900 PCM$
bullet jseadog1 13,500 PCM$
bullet baseball... 7,332 PCM$

bullet Main MG Betting page
bullet Get weekly MG PCM$
bullet Rankings: Top 100
Render time: 2.64 seconds