Hi!
After more then 1,5 years of collecting Trek-3dModels, fixing, arming and other stuffage we started working over dynamical missions for VegaTrek.
I've no knowledge of Python at all so I ask some help in creating our first mission.
To our convinience I've painted mission plan:
1. When mission starts, player's ship is placed into point (X0, Y0, Z0) in terms of 3d-space.
2. Somewhere in space there is located some planet ( coordinates X1, Y1, Z1 ).
3. Planet has radius Rs ( abbr. Radius small )
4. The goal of mission is to put player's ship very close to planet ( under radius Rb )
--
The best analogy is scanning mssion. E.g. in order to scan some object, you need to get to some critical distance to object. Then mission is accomplished
Project Needs Python Help!
Moderators: tillias, Jennos, peteyg
-
- Black Hole Hunter
- Posts: 238
- Joined: Wed Jan 25, 2006 5:37 am
- Location: Russian Federation, Voronezh
- Contact:
Project Needs Python Help!
You do not have the required permissions to view the files attached to this post.
Last edited by tillias on Mon Nov 05, 2007 10:40 am, edited 1 time in total.
God bless you!
-
- Black Hole Hunter
- Posts: 238
- Joined: Wed Jan 25, 2006 5:37 am
- Location: Russian Federation, Voronezh
- Contact:
-
- Elite Hunter
- Posts: 1149
- Joined: Mon Aug 14, 2006 3:56 pm
- Location: Black Forest, Germany
-
- Black Hole Hunter
- Posts: 238
- Joined: Wed Jan 25, 2006 5:37 am
- Location: Russian Federation, Voronezh
- Contact:
Can you point me to module's sources please?Dilloh wrote:From my limited knowledge I assume such a kind of mission already exists - like you mentioned the scan mission (which itself is a cleansweep without enemies).
Cargo missions within campaigns work the same way, I guess having no cargo would result in a mission success while "just" in orbit.
God bless you!
-
- Elite Hunter
- Posts: 1149
- Joined: Mon Aug 14, 2006 3:56 pm
- Location: Black Forest, Germany
Note that I'm always refering to PR1.2 modules, but there should be a lot of similarities.
/modules/cargo_mission.py
cargo_mission doesn't seem to have a distance var, so it either needs to be added or we'll try another kind of mission which is already there.
/modules/cleansweep.py
An example on how to use this in a static campaign:
Note I might be totally wrong with "distance" being the scanning distance. You should try to create a cleansweep mission which has no foes in first case, and modify it long enough until you have a suitable state.
/modules/cargo_mission.py
Code: Select all
def __init__ (self,factionname, numsystemsaway, cargoquantity, missiondifficulty, creds, launchoncapship, time_to_complete, category,jumps=(),var_to_set=''):
/modules/cleansweep.py
Code: Select all
def __init__(self,numsystemsaway, num_points,distance,creds,jumps,donevar,minships,maxships,encounterprob,capshipprob,faction, forceattack,canrunaway):
Code: Select all
'cleansweep',(0,8,50,0,('Gemini/Newcastle','Gemini/Metsor',),rf.name+"_mission",1,2,.9,0,['unknown','retro','pirates'],1,1),
-
- Atmospheric Pilot
- Posts: 1
- Joined: Sat Mar 09, 2019 6:12 am
Re: Project Needs Python Help!
Hello All,
I am newbie to python. And i'm practicing at home to see the youtube videos.
I was trying to use a=zeros(5) in python, but getting the error. Please check it and help me to solve
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'zeros' is not defined
Please help me with this or suggest me any of the python tutorial where i can learn the deep concept of python.
Thanks in advance!
I am newbie to python. And i'm practicing at home to see the youtube videos.
I was trying to use a=zeros(5) in python, but getting the error. Please check it and help me to solve
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'zeros' is not defined
Please help me with this or suggest me any of the python tutorial where i can learn the deep concept of python.
Thanks in advance!
-
- Trader
- Posts: 26
- Joined: Sun Feb 10, 2019 11:12 pm
Re: Project Needs Python Help!
You could just dig in to the documents for this game. Specifically working with scrypting missions, campaigns and quests. There's tons of python used here, and most of the python scripts in this game have helpful comments to tell you what stuff does.