Learning Python

正在查看此主题的用户

hibbs02

Sergeant
Howdy, I'm learning Python right now (my first language BTW.)  I'm going to choose a project to cement the language before I go on to Java or C++.  My question is how close the modding language is to Python.  Would it be a good reinforcer for what I've just learned?  Both in the sense using the same syntax/methods and to how much scripting is necessary to mod M&B.  I can't do textures and I'm not saying that the mod would come out good or interesting.  Just trying to decide whether it would be a good use of my time considering my primary goal of learning Python for the sake of learning Python.  If it's not the best way to go forward if any of you programmer types could give me a good idea for a project I'd really appreciate it.
 
hibbs02 说:
My question is how close the modding language is to Python. 

No relevance whatsoever. I mean they're completely different animals. In fact if Python was an animal, then M&B script would be like... a plant of some kind.
 
It's not a lot like working with pure python. Mostly it's knowing all the formats for things which Armagan has written. It wouldn't hurt and it could be a lot of fun, but it won't help you become a better Python programmer.
 
Come to think of it you could play with the operations and header files and such trying to improve or add a little bit of functionality to the module system and you would be dealing somewhat with actual python but I don't know how productive it would be.
 
Python changes from game to game. There isnt a universal system for working with python. Take a look at battlefield 2, and Mount and Blade, and its like night and day. It depends entirely on how you use the program.
 
I was thinking more like modifying how it calculates certain values or maybe redoing the modules to break it up into more modules so that items, weapons, and armour all have different modules (or maybe combining modules instead). You could even take the items list for the troops away from module_troops or whatever else you thought would be productive. There are so many changes like that and most of the challenge is just coming up with all those ideas and figuring out which ones are good ideas and which are bad ideas.
 
fisheye 说:
hibbs02 说:
My question is how close the modding language is to Python. 

No relevance whatsoever. I mean they're completely different animals. In fact if Python was an animal, then M&B script would be like... a plant of some kind.

Thanks for the prompt responses guys.  I guess I'll have to go with some boring project.  I can see how it could be useful to do some stuff related to the game.  But as this is my first language I guess I'll have to go with some boring project that is relatively simple yet works with all of the programming elements so that they are reinforced.
 
It's not completely useless. If it's your first language, you can get a fairly gentle introduction to the concept of variables, scripts and procedure calls. It's not exactly Python, but you'll find it a lot easier to learn any language if you understand some of the fundamental concepts, since they're pretty universal.

 
Archonsod 说:
fairly gentle introduction

It's an environment where you can get random crashes and utterly opaque error messages. Also commands don't work the way they should; depending on the (totally arbitrary) game context. It's the harshest environment I've ever programmed in short of assembly code. My opinion only, of course.

Not to say M&B script is hard to learn; it's just if you start out in a proper, nicely behaved language (like Python or Perl or even Java) you get a lot more support during the initial learning curve.
 
后退
顶部 底部