Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
Darrin

Registered:
Posts: 434
Reply with quote  #1 

First, some disclaimers:

  • Everything I post here is fan-generated content. It is not Official Artemis Cosmos content. All Official Information regarding the new version of Artemis will be posted by Thom Robertson when he gets the game closer to release.
  • Thom has shared an early Alpha version of some of his code with a few Close Personal Friends. It is incomplete and still missing a lot of things. From that, I was able to create a playable mission with Win/Lose/Draw conditions. I'm posting the code here so that some of the other scripters can get an idea of how the new mission scripting will work with Python.
  • Thom showed a short demo of what's working so far last Saturday at Mike Substelny's home. He ran through my script as an example, and it didn't crash, so... that was pretty cool!
  • I am new to Python coding, so my code probably looks very crude and might be full of horrible fingernail-screeching syntax errors. The tabs are also all screwed up, and Python gets really uppity about the proper tab indents, but I can't quite figure out how to fix that in this text editor. So... sorry about that. I'm still learning.
  • There is no guarantee that anything you see here will wind up in later versions of Artemis Cosmos. Thom's code is still under development, and a good chunk of the code I'm using are placeholders for modules/features that Thom hasn't finished writing yet.
  • "Artemis Cosmos" is Thom's preferred name. He said he's not all that fond of "Artemis 3" because he considers this new game a full from-the-ground-up rebuild with an entirely new graphics engine instead of a "new version" of his Artemis 2 code. In his mind, this is how the code should have been written 10-15 years ago. He may change the name later.


Note: For some reason, the editor in this form has gone all wonky on me, and it won't display the CODE tags properly, and won't format the tabs correctly. So I've attached my mission script as a .zip. It's been updated to Artemis Cosmos 3.0.0.6-alpha, if that matters.


A few screenshots:


tictac1.png 
"Hey, could have been worse... At least it's not Tholian Monopoly." 


tictac2.png
 Ensign, please lock beams on Jim J. Bullock to block." 
 
tictac3.png 
"Because I was inverted."

 
Attached Files
zip ArtemisCosmos-TicTacTorgoth-v3006a.zip (6.75 KB, 1 view)


__________________
Call Sign (EF/TSN): Bassellope

mattssheep4

Avatar / Picture

Registered:
Posts: 128
Reply with quote  #2 
Is the sbs module something we scripters could get access to anytime soon? I'm sure there will be tons of changes before release, but it'd be nice to not have all those errors in my code saying the module doesn't exist 😋


Quote:
Originally Posted by Darrin
# astcolor sets the asteeroid color, 0 = blue, 1 = red, 2 = yellow.


Awesome that there's more types of asteroids, but is there any chance we could set the color using hue/hex/other with a wider range of colors?

__________________

Captain Matthew Vaj

Former Commanding Officer, TSN Viper, 2nd Space Fleet, 4th Light Division

TSN RP Community - Listen to our Fleet News Service! - Join our Discord Server!

Intelligence Officer of the Cygnus Campaign

Darrin

Registered:
Posts: 434
Reply with quote  #3 
Quote:
Originally Posted by mattssheep4
Is the sbs module something we scripters could get access to anytime soon? I'm sure there will be tons of changes before release, but it'd be nice to not have all those errors in my code saying the module doesn't exist 😋



Disclaimer: This is from an early alpha version of Artemis Cosmos, and not an official release from Thom. Here's the "documentation" on sbs (which is a bit puzzling to me, because I don't see anything in there about "delete_object"... the documentation may be from a previous version):


Help on built-in module sbs:

NAME
sbs

CLASSES
pybind11_builtins.pybind11_object(builtins.object)
SHPSYS
landmark
object_data_set
quaternion
simulation
space_object
space_object_list
vec2
vec3
vec4

class SHPSYS(pybind11_builtins.pybind11_object)
| Method resolution order:
| SHPSYS
| pybind11_builtins.pybind11_object
| builtins.object
|
| Methods defined here:
|
| __eq__ = (...)
| (self: object, arg0: object) -> bool
|
| __getstate__ = (...)
| (self: object) -> int_
|
| __hash__ = (...)
| (self: object) -> int_
|
| __init__(...)
| __init__(self: sbs.SHPSYS, arg0: int) -> None
|
| __int__(...)
| __int__(self: sbs.SHPSYS) -> int
|
| __ne__ = (...)
| (self: object, arg0: object) -> bool
|
| __repr__ = (...)
| (self: handle) -> str
|
| __setstate__ = (...)
| (self: sbs.SHPSYS, arg0: int) -> None
|
| ----------------------------------------------------------------------
| Readonly properties defined here:
|
| __members__
|
| name
| (self: handle) -> str
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| ENGINES = SHPSYS.ENGINES
|
| SENSORS = SHPSYS.SENSORS
|
| SHIELDS = SHPSYS.SHIELDS
|
| WEAPONS = SHPSYS.WEAPONS
|
| ----------------------------------------------------------------------
| Static methods inherited from pybind11_builtins.pybind11_object:
|
| __new__(*args, **kwargs) from pybind11_builtins.pybind11_type
| Create and return a new object. See help(type) for accurate signature.

class landmark(pybind11_builtins.pybind11_object)
| Method resolution order:
| landmark
| pybind11_builtins.pybind11_object
| builtins.object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| color
| vec4, color on 2d radar
|
| position
| vec3, position in space
|
| text
| string, text label
|
| ----------------------------------------------------------------------
| Static methods inherited from pybind11_builtins.pybind11_object:
|
| __new__(*args, **kwargs) from pybind11_builtins.pybind11_type
| Create and return a new object. See help(type) for accurate signature.

class object_data_set(pybind11_builtins.pybind11_object)
| Method resolution order:
| object_data_set
| pybind11_builtins.pybind11_object
| builtins.object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| get(...)
| get(*args, **kwargs)
| Overloaded function.
|
| 1. get(self: sbs.object_data_set, arg0: str, arg1: int) -> object
|
| Get a value, by name
|
| 2. get(self: sbs.object_data_set, arg0: int, arg1: int) -> object
|
| Get a value, by ID
|
| set(...)
| set(*args, **kwargs)
| Overloaded function.
|
| 1. set(self: sbs.object_data_set, tag: str, in: int, index: int = 0, extraDocText: str = 'a') -> int
|
| Set an int value, by name
|
| 2. set(self: sbs.object_data_set, tag: str, in: int, index: int = 0, extraDocText: str = 'a') -> int
|
| Set an int64 value, by name
|
| 3. set(self: sbs.object_data_set, tag: str, in: float, index: int = 0, extraDocText: str = 'a') -> int
|
| Set a float value, by name
|
| 4. set(self: sbs.object_data_set, tag: str, in: str, index: int = 0, extraDocText: str = 'a') -> int
|
| Set a string value, by name
|
| 5. set(self: sbs.object_data_set, arg0: int, arg1: int, arg2: int) -> int
|
| Set an int value, by ID
|
| 6. set(self: sbs.object_data_set, arg0: int, arg1: int, arg2: int) -> int
|
| Set an int64 value, by ID
|
| 7. set(self: sbs.object_data_set, arg0: int, arg1: float, arg2: int) -> int
|
| Set a float value, by ID
|
| 8. set(self: sbs.object_data_set, arg0: int, arg1: str, arg2: int) -> int
|
| Set a string value, by ID
|
| ----------------------------------------------------------------------
| Static methods inherited from pybind11_builtins.pybind11_object:
|
| __new__(*args, **kwargs) from pybind11_builtins.pybind11_type
| Create and return a new object. See help(type) for accurate signature.

class quaternion(pybind11_builtins.pybind11_object)
| Method resolution order:
| quaternion
| pybind11_builtins.pybind11_object
| builtins.object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| w
| float, component value
|
| x
| float, component value
|
| y
| float, component value
|
| z
| float, component value
|
| ----------------------------------------------------------------------
| Static methods inherited from pybind11_builtins.pybind11_object:
|
| __new__(*args, **kwargs) from pybind11_builtins.pybind11_type
| Create and return a new object. See help(type) for accurate signature.

class simulation(pybind11_builtins.pybind11_object)
| Method resolution order:
| simulation
| pybind11_builtins.pybind11_object
| builtins.object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| add_landmark(...)
| add_landmark(self: sbs.simulation, arg0: float, arg1: float, arg2: float, arg3: str, arg4: float, arg5: float, arg6: float, arg7: float) -> sbs.landmark
|
| adds a new landmark to space; don't hold on to this Landmark object in a global; keep the name string instead
|
| clear_landmarks(...)
| clear_landmarks(self: sbs.simulation) -> None
|
| deletes all landmarks
|
| delete_landmark_by_name(...)
| delete_landmark_by_name(self: sbs.simulation, arg0: str) -> None
|
| deletes landmark by its name
|
| delete_landmark_by_reference(...)
| delete_landmark_by_reference(self: sbs.simulation, arg0: sbs.landmark) -> None
|
| deletes landmark by its reference
|
| get_landmark_by_name(...)
| get_landmark_by_name(self: sbs.simulation, arg0: str) -> sbs.landmark
|
| takes a string name, returns the associated Landmark object
|
| get_space_object(...)
| get_space_object(self: sbs.simulation, arg0: int) -> sbs.space_object
|
| returns the refence to a spaceobject, by ID
|
| make_new_active(...)
| make_new_active(self: sbs.simulation, arg0: str, arg1: str) -> int
|
| creates a new spaceobject
|
| make_new_passive(...)
| make_new_passive(self: sbs.simulation, arg0: str, arg1: str) -> int
|
| creates a new spaceobject
|
| make_new_player(...)
| make_new_player(self: sbs.simulation, arg0: str, arg1: str) -> int
|
| creates a new spaceobject
|
| reposition_space_object(...)
| reposition_space_object(self: sbs.simulation, arg0: sbs.space_object, arg1: float, arg2: float, arg3: float) -> None
|
| immedaitely changes the position of a spaceobject
|
| space_object_exists(...)
| space_object_exists(self: sbs.simulation, arg0: int) -> bool
|
| returns true if the spaceobject exists, by ID
|
| ----------------------------------------------------------------------
| Readonly properties defined here:
|
| time_tick_counter
| get current time value
|
| ----------------------------------------------------------------------
| Static methods inherited from pybind11_builtins.pybind11_object:
|
| __new__(*args, **kwargs) from pybind11_builtins.pybind11_type
| Create and return a new object. See help(type) for accurate signature.

class space_object(pybind11_builtins.pybind11_object)
| Method resolution order:
| space_object
| pybind11_builtins.pybind11_object
| builtins.object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| set_behavior(...)
| set_behavior(self: sbs.space_object, arg0: str) -> None
|
| set name of behavior module
| current available behavior modules : nebula, npcship, asteroid, playership, station
|
| ----------------------------------------------------------------------
| Readonly properties defined here:
|
| data_set
| object_data_set, read only, refernce to the object_data_set of this particular object
|
| tick_type
| string, name of behavior module
| current available behavior modules : nebula, npcship, asteroid, playership, station
|
| tick_type_ID
| int32, read only, internal representation of tick_type
|
| type
| int, 0=passive, 1=active, 2=playerShip
|
| unique_ID
| int32, read only, id of this particular object
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| cur_speed
| float, speed of object
|
| data_tag
| string, name of data entry in shipData.json
|
| exclusion_radius
| float, other objects cannot be closer to me than this distance
|
| fat_radius
| float, radius of box for internal sorting calculations
|
| pos
| vec3, position in space
|
| rot_quat
| quaternion, heading and orientation of this object
|
| steering_quat
| quaternion, change to heading and orientation of this object, over time
|
| ----------------------------------------------------------------------
| Static methods inherited from pybind11_builtins.pybind11_object:
|
| __new__(*args, **kwargs) from pybind11_builtins.pybind11_type
| Create and return a new object. See help(type) for accurate signature.

class space_object_list(pybind11_builtins.pybind11_object)
| Method resolution order:
| space_object_list
| pybind11_builtins.pybind11_object
| builtins.object
|
| Methods defined here:
|
| __bool__(...)
| __bool__(self: sbs.space_object_list) -> bool
|
| Check whether the list is nonempty
|
| __contains__(...)
| __contains__(self: sbs.space_object_list, x: sbs.space_object) -> bool
|
| Return true the container contains ``x``
|
| __delitem__(...)
| __delitem__(*args, **kwargs)
| Overloaded function.
|
| 1. __delitem__(self: sbs.space_object_list, arg0: int) -> None
|
| Delete the list elements at index ``i``
|
| 2. __delitem__(self: sbs.space_object_list, arg0: slice) -> None
|
| Delete list elements using a slice object
|
| __eq__(...)
| __eq__(self: sbs.space_object_list, arg0: sbs.space_object_list) -> bool
|
| __getitem__(...)
| __getitem__(*args, **kwargs)
| Overloaded function.
|
| 1. __getitem__(self: sbs.space_object_list, s: slice) -> sbs.space_object_list
|
| Retrieve list elements using a slice object
|
| 2. __getitem__(self: sbs.space_object_list, arg0: int) -> sbs.space_object
|
| __init__(...)
| __init__(*args, **kwargs)
| Overloaded function.
|
| 1. __init__(self: sbs.space_object_list) -> None
|
| 2. __init__(self: sbs.space_object_list, arg0: sbs.space_object_list) -> None
|
| Copy constructor
|
| 3. __init__(self: sbs.space_object_list, arg0: iterable) -> None
|
| __iter__(...)
| __iter__(self: sbs.space_object_list) -> iterator
|
| __len__(...)
| __len__(self: sbs.space_object_list) -> int
|
| __ne__(...)
| __ne__(self: sbs.space_object_list, arg0: sbs.space_object_list) -> bool
|
| __repr__(...)
| __repr__(self: sbs.space_object_list) -> str
|
| Return the canonical string representation of this list.
|
| __setitem__(...)
| __setitem__(*args, **kwargs)
| Overloaded function.
|
| 1. __setitem__(self: sbs.space_object_list, arg0: int, arg1: sbs.space_object) -> None
|
| 2. __setitem__(self: sbs.space_object_list, arg0: slice, arg1: sbs.space_object_list) -> None
|
| Assign list elements using a slice object
|
| append(...)
| append(self: sbs.space_object_list, x: sbs.space_object) -> None
|
| Add an item to the end of the list
|
| count(...)
| count(self: sbs.space_object_list, x: sbs.space_object) -> int
|
| Return the number of times ``x`` appears in the list
|
| extend(...)
| extend(self: sbs.space_object_list, L: sbs.space_object_list) -> None
|
| Extend the list by appending all the items in the given list
|
| insert(...)
| insert(self: sbs.space_object_list, i: int, x: sbs.space_object) -> None
|
| Insert an item at a given position.
|
| pop(...)
| pop(*args, **kwargs)
| Overloaded function.
|
| 1. pop(self: sbs.space_object_list) -> sbs.space_object
|
| Remove and return the last item
|
| 2. pop(self: sbs.space_object_list, i: int) -> sbs.space_object
|
| Remove and return the item at index ``i``
|
| remove(...)
| remove(self: sbs.space_object_list, x: sbs.space_object) -> None
|
| Remove the first item from the list whose value is x. It is an error if there is no such item.
|
| ----------------------------------------------------------------------
| Data and other attributes defined here:
|
| __pybind11_module_local_v3__ = <capsule object NULL>
|
| ----------------------------------------------------------------------
| Static methods inherited from pybind11_builtins.pybind11_object:
|
| __new__(*args, **kwargs) from pybind11_builtins.pybind11_type
| Create and return a new object. See help(type) for accurate signature.

class vec2(pybind11_builtins.pybind11_object)
| Method resolution order:
| vec2
| pybind11_builtins.pybind11_object
| builtins.object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| x
| float, component value
|
| y
| float, component value
|
| ----------------------------------------------------------------------
| Static methods inherited from pybind11_builtins.pybind11_object:
|
| __new__(*args, **kwargs) from pybind11_builtins.pybind11_type
| Create and return a new object. See help(type) for accurate signature.

class vec3(pybind11_builtins.pybind11_object)
| Method resolution order:
| vec3
| pybind11_builtins.pybind11_object
| builtins.object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| x
| float, component value
|
| y
| float, component value
|
| z
| float, component value
|
| ----------------------------------------------------------------------
| Static methods inherited from pybind11_builtins.pybind11_object:
|
| __new__(*args, **kwargs) from pybind11_builtins.pybind11_type
| Create and return a new object. See help(type) for accurate signature.

class vec4(pybind11_builtins.pybind11_object)
| Method resolution order:
| vec4
| pybind11_builtins.pybind11_object
| builtins.object
|
| Methods defined here:
|
| __init__(self, /, *args, **kwargs)
| Initialize self. See help(type(self)) for accurate signature.
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| a
| float, component value (0.0-1.0)
|
| b
| float, component value (0.0-1.0)
|
| g
| float, component value (0.0-1.0)
|
| r
| float, component value (0.0-1.0)
|
| ----------------------------------------------------------------------
| Static methods inherited from pybind11_builtins.pybind11_object:
|
| __new__(*args, **kwargs) from pybind11_builtins.pybind11_type
| Create and return a new object. See help(type) for accurate signature.




Quote:
Originally Posted by mattssheep4
Awesome that there's more types of asteroids, but is there any chance we could set the color using hue/hex/other with a wider range of colors?


Thom sent me some asteroid assets, but I haven't had a chance to play around with them yet. I was just using what was already in "shipData.json". Here's a picture of the different asteroids that should be possible:

representative-image.png 
As far as setting the RGB color, you could throw the "emission" PNG into an image editor and adjust the RGB values that way. I'll see if Thom can add something to tweak the RGB values from the make_object function.


__________________
Call Sign (EF/TSN): Bassellope

Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.